diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/store_merging_12.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/store_merging_12.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/store_merging_12.c b/gcc/testsuite/gcc.dg/store_merging_12.c new file mode 100644 index 00000000000..67f23449e93 --- /dev/null +++ b/gcc/testsuite/gcc.dg/store_merging_12.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -Wall" } */ + +struct S { unsigned int b1:1, b2:1, b3:1, b4:1, b5:1, b6:27; }; +void bar (struct S *); +void foo (int x) +{ + struct S s; + s.b2 = 1; s.b3 = 0; s.b4 = 1; s.b5 = 0; s.b1 = x; s.b6 = x; /* { dg-bogus "is used uninitialized in this function" } */ + bar (&s); +} |