tree-optimization/116481 - avoid building function_type[]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / pr94066-3.C
blob175018acf86bfe1008838df7fa2d3e43b2ff73bf
1 // PR c++/94066
2 // { dg-do compile { target c++14 } }
4 union U;
5 constexpr int foo(U *up);
7 union U {
8   int a = foo(this); int y;
9 };
11 constexpr int foo(U *up) {
12   up->y = 11; // { dg-error "'U::a' to 'U::y'" }
13   return {42};
16 extern constexpr U u = {};