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