PR c/64856
[official-gcc.git] / gcc / testsuite / gcc.dg / pr64465.c
blobacfa952b00c2e9c5d800c7fb0944922ff6a93170
1 /* PR tree-optimization/64465 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fexceptions" } */
5 extern int foo (int *);
6 extern int bar (int, int);
7 static inline __attribute__ ((__always_inline__))
8 int baz (int o)
10 if (__builtin_constant_p (o))
11 return bar (o, 1);
12 return bar (o, 0);
15 void
16 test (void)
18 int s;
19 foo (&s);
20 baz (4);
21 baz (s);