Debian Codegraph @

gcc/testsuite/g++.dg/opt/ice1.C

raw
1 // PR c++/43024
2 // { dg-options "-O2" }
3
4 void foo();
5
6 template<int> struct X
7 {
8 enum { e };
9 typedef int Y;
10 };
11
12 template<int N = 0> struct A
13 {
14 ~A() { foo(); }
15 A() { a<0>(0); }
16 template<int> void a(typename X<!X<N>::e>::Y);
17 struct B b();
18 };
19
20 struct B
21 {
22 A<> b0, b1, b2, b3;
23 B operator+ (const B&);
24 };
25
26 struct C
27 {
28 A<> c0, c1, c2, c3, c4, c5, c6, c7, c8;
29 };
30
31 inline void bar(int i)
32 {
33 A<> a0, a1;
34 if (i) a0.b() + a0.b() + a0.b() + a0.b();
35 }
36
37 void baz()
38 {
39 C c;
40 bar(0);
41 }