1 /* { dg-options "-O2 -fno-ipa-icf" } */
3 void runtime_error (void) __attribute__ ((noreturn
));
4 void compiletime_error (void) __attribute__ ((noreturn
, error ("")));
7 compiletime_check_equals_1 (int *x
, int y
)
10 if (__builtin_constant_p (__p
) && __p
)
17 compiletime_check_equals_2 (int *x
, int y
)
20 if (__builtin_constant_p (__p
) && __p
)
21 compiletime_error (); /* { dg-error "call to" } */
29 compiletime_check_equals_1 (x
, 5);
30 compiletime_check_equals_2 (x
, 10);