Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/constexpr-empty3.C

raw
1 // PR c++/80294
2 // { dg-do compile { target c++14 } }
3 // { dg-final { scan-assembler-not "static_init" } }
4
5 struct A {
6 constexpr int f() { A a = *this; return 42; }
7 };
8 struct B: A
9 {
10 int i;
11 constexpr B(): i(f()) {}
12 };
13
14 B b;