2 // { dg-do compile { target c++20 } }
3 // From cxx2b-consteval-propagate.cpp.
11 side_effect(); // { dg-error "call to non-.constexpr. function" }
20 SS::SS(){} // { dg-error "call to consteval function" }
25 if (!__builtin_is_constant_evaluated ())
45 consteval int undef (int x); // { dg-warning "never defined" }
48 int a = sizeof(undef(0));
51 X() = default; // { dg-error {'consteval int undef\(int\)' used before its definition} }
57 [[maybe_unused]] X x; // { dg-error "call to consteval function" }
58 // { dg-message "promoted to an immediate function" "" { target *-*-* } .-1 }