PR rtl-optimization/88018
[official-gcc.git] / gcc / testsuite / c-c++-common / torture / pr60971.c
blobb7a967dabb45f60a265ff9ab57fc1d7a3dc2b2f2
1 /* PR tree-optimization/60971 */
2 /* { dg-do run } */
4 #ifndef __cplusplus
5 #define bool _Bool
6 #endif
8 volatile unsigned char c;
10 __attribute__((noinline)) unsigned char
11 foo (void)
13 return c;
16 __attribute__((noinline)) bool
17 bar (void)
19 return foo () & 1;
22 int
23 main ()
25 c = 0x41;
26 c = bar ();
27 if (c != 1)
28 __builtin_abort ();
29 c = 0x20;
30 c = bar ();
31 if (c != 0)
32 __builtin_abort ();
33 return 0;