gcc/testsuite/gcc.dg/pr69802.c
raw| 1 | /* PR tree-optimization/69802 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -Wall" } */ |
| 4 | |
| 5 | struct S { unsigned f : 1; }; |
| 6 | int a, d; |
| 7 | |
| 8 | int |
| 9 | foo (void) |
| 10 | { |
| 11 | unsigned b = 0; |
| 12 | struct S c; |
| 13 | d = ((1 && b) < c.f) & c.f; /* { dg-warning "is used uninitialized" } */ |
| 14 | return a; |
| 15 | } |
| 16 | |
| 17 | int |
| 18 | bar (_Bool c) |
| 19 | { |
| 20 | unsigned b = 0; |
| 21 | d = ((1 && b) < c) & c; |
| 22 | return a; |
| 23 | } |