2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / ice1.C
blob701897166f51936588f3401e8a5aafdd1df14772
1 // PR c++/43024
2 // { dg-options "-O2" }
4 void foo();
6 template<int> struct X
8   enum { e };
9   typedef int Y;
12 template<int N = 0> struct A
14   ~A() { foo(); }
15   A() { a<0>(0); }
16   template<int> void a(typename X<!X<N>::e>::Y);
17   struct B b();
20 struct B
22   A<> b0, b1, b2, b3;
23   B operator+ (const B&);
26 struct C
28   A<> c0, c1, c2, c3, c4, c5, c6, c7, c8;
31 inline void bar(int i)
33   A<> a0, a1;
34   if (i) a0.b() + a0.b() + a0.b() + a0.b();
37 void baz()
39   C c;
40   bar(0);