summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c b/gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c
new file mode 100644
index 000000000..c785257cc
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c
@@ -0,0 +1,17 @@
+struct {
+ int a:4;
+ int :4;
+ int b:4;
+ int c:4;
+} x = { 2,3,4 };
+
+main ()
+{
+ if (x.a != 2)
+ abort ();
+ if (x.b != 3)
+ abort ();
+ if (x.c != 4)
+ abort ();
+ exit (0);
+}