Debian Codegraph @

gcc/testsuite/g++.dg/ipa/pr91956.C

raw
1 /* { dg-do compile } */
2 /* { dg-options "-Os -std=c++11 -fno-strict-aliasing -fno-tree-fre -fno-tree-vrp" } */
3
4 int count = 0;
5 struct VB
6 {
7 VB() {++count;}
8 };
9
10 struct B : virtual VB
11 {
12 B() : B(42) {}
13 B(int) {}
14 };
15
16 struct D : B
17 {
18 D() {}
19 D(int) : D() {}
20 };
21
22 int main()
23 {
24 D d{42};
25 if (count != 1)
26 __builtin_abort();
27 }