PR tree-optimization/81384 - built-in form of strnlen missing
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / builtin-constant.c
blob9e5bfb8bfe80496aa5812ace3de848d02edc4ecb
1 /* PR optimization/8423. */
3 #define btest(x) __builtin_constant_p(x) ? "1" : "0"
5 #ifdef __OPTIMIZE__
6 void
7 foo (char *i)
9 if (*i == '0')
10 abort ();
12 #else
13 void
14 foo (char *i)
17 #endif
19 int
20 main (void)
22 int size = sizeof (int);
23 foo (btest (size));
24 foo (btest (size));
25 exit (0);