gcc/testsuite/gcc.dg/pr54676.c
raw| 1 | /* PR tree-optimization/54676 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O -fno-tree-ccp -fno-tree-copy-prop -fno-tree-fre -ftree-vrp" } */ |
| 4 | |
| 5 | struct S |
| 6 | { |
| 7 | int s:1; |
| 8 | }; |
| 9 | |
| 10 | struct S bar (void); |
| 11 | |
| 12 | #if __SIZEOF_INT__ < 4 |
| 13 | #define int __INT32_TYPE__ |
| 14 | #endif |
| 15 | |
| 16 | int a; |
| 17 | |
| 18 | void |
| 19 | foo (int x) |
| 20 | { |
| 21 | struct S s = bar (); |
| 22 | while (!a) |
| 23 | { |
| 24 | int l = 94967295; |
| 25 | a = x || (s.s &= l); |
| 26 | } |
| 27 | } |