Debian Codegraph @

gcc/testsuite/g++.dg/ext/builtin7.C

raw
1 // PR c++/19628
2 // Verify that __builtin_constant_p may appear in a constant-expression.
3
4 // { dg-do run }
5
6 int main()
7 {
8 switch (3) {
9 case (__builtin_constant_p(7) ? 3 : 8):
10 return 0;
11 default:
12 return 1;
13 }
14 }