/cp
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / constexpr-empty3.C
blob37e4a53a7a9b220ed2e92f2b249f8cdcce0390ea
1 // PR c++/80294
2 // { dg-do compile { target c++14 } }
3 // { dg-final { scan-assembler-not "static_init" } }
5 struct A {
6   constexpr int f() { A a = *this; return 42; }
7 };
8 struct B: A
10   int i;
11   constexpr B(): i(f()) {}
14 B b;