Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/opt/pr91164.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 // PR rtl-optimization/91164 | |
2 // { dg-do compile { target c++11 } } | |
3 // { dg-options "-O2 -fdelete-dead-exceptions -fnon-call-exceptions -fno-rerun-cse-after-loop -fno-tree-forwprop" } | |
4 | |
5 template <typename, typename = int> class b; | |
6 template <int v> struct d { static constexpr int e = v; }; | |
7 template <bool, typename f> using g = f; | |
8 struct h { template <typename i> using j = i; }; | |
9 template <typename, typename f> using k = h::j<f>; | |
10 void *operator new(__SIZE_TYPE__, void *); | |
11 struct l { l(); }; | |
12 struct m; | |
13 template <typename n> n aa(m); | |
14 struct o { template <typename> using ab = l; }; | |
15 template <typename, typename> struct b { | |
16 struct q : o::ab<int> { q(int, l = l()) : p() {} int p; } ac; | |
17 void ad(); | |
18 b() : ac(0) {} | |
19 ~b() { bool r = ac.p == 0; if (r) ad(); } | |
20 const wchar_t *ae(); | |
21 }; | |
22 struct m {}; | |
23 struct t { virtual void f(); }; | |
24 struct u { l a; }; | |
25 struct af : t { | |
26 struct ag { ag(l); }; | |
27 af(l ah) : ai(ah) {} | |
28 ag ai; | |
29 }; | |
30 struct w { | |
31 template <typename f, typename x> w(f, x y) { new (0) af(y.a); } | |
32 }; | |
33 struct z { | |
34 using aj = int; | |
35 template <typename x> z(x ah) : ak(al, ah) {} | |
36 aj al; | |
37 w ak; | |
38 }; | |
39 struct am : z { template <typename x> am(x ah) : z(ah) {} }; | |
40 template <typename, typename x> am an(x) { return u{}; } | |
41 template <typename> am ao() { return an<int>(l()); } | |
42 struct ap { | |
43 k<int, int> aq; | |
44 k<int, int> ar; | |
45 k<int, int> as; | |
46 }; | |
47 struct at { ap a; long au; ap av; ap aw; }; | |
48 struct ax { at c; ax() : c() {} }; | |
49 enum ay : int; | |
50 ay az, ba; | |
51 struct bb { bb(wchar_t *, wchar_t *, ay, m); }; | |
52 template <typename bc> struct bd { | |
53 typedef typename bc::be *bf; | |
54 bd(bf, bf, const typename bc::bg &, ay); | |
55 ay bh; | |
56 bb bi; | |
57 am bj; | |
58 typename bc::bk e; | |
59 ax bl; | |
60 int bm; | |
61 }; | |
62 template <typename, typename> using bn = g<d<false>::e, am>; | |
63 template <typename bc> | |
64 bd<bc>::bd(bf ah, bf y, const typename bc::bg &bu, ay) | |
65 : bi(ah, y, bh, bu), bj(ao<bc>()), bm(aa<int>(bu)) {} | |
66 struct bt { typedef wchar_t be; typedef b<be> bk; typedef m bg; }; | |
67 template <typename bc, typename bo> bn<bo, bc> bar(); | |
68 template <typename bc, typename bo> bn<bo, bc> bq(bo) { | |
69 typename bc::bg bp; | |
70 auto bs = nullptr; | |
71 using br = bd<bc>; | |
72 br(bs, bs, bp, ba); | |
73 return bar<bc, bo>(); | |
74 } | |
75 struct bw { | |
76 bw(); | |
77 template <typename bv, typename x> void assign(b<bv, x> ah) { | |
78 const wchar_t by = *ah.ae(); | |
79 bw(&by, ah.ae(), bp, az); | |
80 } | |
81 template <typename bo> bw(bo, bo y, m, ay) : automaton(bq<bt>(y)) {} | |
82 m bp; | |
83 am automaton; | |
84 }; | |
85 void bx() { | |
86 b<wchar_t> s; | |
87 bw ca; | |
88 ca.assign(s); | |
89 } |