aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c b/gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c
new file mode 100644
index 00000000000..3342439e54d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c
@@ -0,0 +1,15 @@
+struct s {
+ int a[3];
+ int c[3];
+};
+
+struct s s = {
+ c: {1, 2, 3}
+};
+
+main()
+{
+ if (s.c[0] != 1)
+ abort ();
+ exit (0);
+}