Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/c-c++-common/torture/pr60971.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* PR tree-optimization/60971 */ | |
2 /* { dg-do run } */ | |
3 | |
4 #ifndef __cplusplus | |
5 #define bool _Bool | |
6 #endif | |
7 | |
8 volatile unsigned char c; | |
9 | |
10 __attribute__((noinline)) unsigned char | |
11 foo (void) | |
12 { | |
13 return c; | |
14 } | |
15 | |
16 __attribute__((noinline)) bool | |
17 bar (void) | |
18 { | |
19 return foo () & 1; | |
20 } | |
21 | |
22 int | |
23 main () | |
24 { | |
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; | |
34 } |