blob: 8975002ad13365e952127a912186ced1df511e66 [file] [log] [blame]
// { dg-do run }
// { dg-options "-std=c++2a" }
extern "C" void abort ();
consteval int foo () { return 42; }
consteval auto bar () { return foo; }
consteval int baz (int (*fn) () = bar ()) { return fn (); }
constexpr int a = baz ();
static_assert (a == 42);
int b = baz ();
int
main ()
{
if (b != 42)
abort ();
}