Debian Codegraph @

gcc/testsuite/g++.dg/cpp23/consteval-if13.C

raw
1 // PR c++/115583
2 // { dg-do compile { target c++23 } }
3 // { dg-additional-options -O }
4
5 consteval int f(int i) {
6 return i;
7 }
8 const bool b = 0;
9 constexpr int g(int i) {
10 if consteval {
11 return f(i);
12 } else {
13 return i;
14 }
15 }
16 int main() {
17 return g(1);
18 }