testsuite: update mangling
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / constexpr-init5.C
bloba9e717d91f94b862f252310c0b630da46bbec690
1 // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2 // { dg-do compile { target c++20 } }
4 struct S { int i; };
6 constexpr void
7 fn ()
9   S s;
11   []() constexpr {
12     int i;
13   }();
16 constexpr int
17 fn2 ()
19   return __extension__ ({ int n; n; }); // { dg-error "not usable in a constant expression" }
22 constexpr int i = fn2 (); // { dg-message "in .constexpr. expansion of" }