comparison gcc/testsuite/g++.target/aarch64/pr94052.C @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
18:1830386684a0 19:2b5abeee2509
1 /* { dg-do compile } */
2 /* { dg-additional-options "-O2 -std=gnu++11 -w" } */
3
4 namespace c {
5 typedef int d;
6 template <typename e> struct f { typedef e g; };
7 template <bool, typename> struct h;
8 template <typename e> e aa(typename f<e>::g i) { return i; }
9 template <typename, typename> struct j {};
10 template <d, typename> struct k;
11 template <class l, class m> struct k<1, j<l, m>> { typedef m g; };
12 template <d n, class l, class m> typename k<n, j<l, m>>::g ab(j<l, m>);
13 } // namespace c
14 typedef long d;
15 typedef char o;
16 typedef int p;
17 typedef char q;
18 typedef int r;
19 namespace {
20 struct s;
21 constexpr d t = 6;
22 template <typename> class ad {
23 public:
24 static constexpr d u = t;
25 d v();
26 d x();
27 d y();
28 };
29 class z : ad<int> {};
30 struct ae {
31 p af;
32 };
33 class ag {
34 public:
35 ae ah();
36 };
37 } // namespace
38 typedef __Int32x4_t ai;
39 typedef struct {
40 ai aj[2];
41 } ak;
42 typedef int al;
43 void am(p *a, ai b) { __builtin_aarch64_st1v4si(a, b); }
44 namespace an {
45 class ao {
46 public:
47 bool operator==(ao);
48 d v();
49 d x();
50 };
51 class ap : public ad<r> {};
52 class aq {
53 public:
54 c::j<int, int> ar();
55 int as();
56 int at();
57 };
58 class au {
59 public:
60 virtual d av(d);
61 virtual ap aw();
62 virtual ag ax();
63 };
64 class ay {};
65 class az {
66 virtual void ba(const ay &, const s &);
67 };
68 using bb = az;
69 class bc;
70 class bd : bb {
71 void ba(const ay &, const s &);
72 bc *be;
73 bc *bf;
74 bc *bg;
75 aq bh;
76 int bi;
77 int bj;
78 ao bk;
79 };
80 namespace bl {
81 namespace bm {
82 namespace bn {
83 class bo;
84 }
85 } // namespace bm
86 } // namespace bl
87 namespace bn {
88 template <typename ac = c::h<0, bl::bm ::bn::bo>>
89 ai bp(ac *, ac *, ac *, al, al, al, d, p);
90 template <typename ac = c::h<0, bl::bm ::bn::bo>>
91 ak bq(ac *br, ac *bs, ac *bt, al bu, al bv, al bw, d bx, int, int by) {
92 ak{bp(br, bs, bt, bu, bv, bw, bx, by), bp(br, bs, bt, bu, bv, bw, bx, by)};
93 }
94 template <typename ac = c::h<0, bl::bm ::bn::bo>>
95 ak bz(ac *, ac *, ac *, al, al, al &, int, p);
96 template <int> void ca(p *, const ak &);
97 template <> void ca<1>(p *buffer, const ak &cb) {
98 am(buffer, cb.aj[0]);
99 am(buffer + 4, cb.aj[1]);
100 }
101 int cc(int, int);
102 } // namespace bn
103 class bc {
104 public:
105 virtual au *cd();
106 };
107 class ce {
108 public:
109 q *cf();
110 };
111 template <d> struct cg {
112 template <typename ch> static void ci(ay, z cj, ch ck) { ck(cj); }
113 };
114 template <typename ch> void cl(ay w, ch ck) {
115 z cj;
116 cg<z::u>::ci(w, cj, c::aa<ch>(ck));
117 }
118 namespace {
119 template <typename T1, typename cm, int cn> class co {
120 public:
121 static void convolve(ay, int cs, bc *cp, bc *cq, bc *cr, aq cw, int, ao ct) {
122 int by = cp->cd()->ax().ah().af;
123 int cu = cq->cd()->ax().ah().af;
124 cp->cd()->aw().v();
125 int cv = cp->cd()->aw().x();
126 cp->cd()->aw().y();
127 cp->cd()->aw();
128 int da = cr->cd()->aw().x();
129 int cx = cq->cd()->aw().x();
130 cq->cd()->aw().y();
131 int cy = cr->cd()->av(0);
132 int cz = cr->cd()->av(1);
133 bn::cc(cs, cn);
134 int de = c::ab<1>(cw.ar());
135 cw.as();
136 cw.at();
137 ay db;
138 ce dc;
139 ce dd;
140 ce w;
141 q *di = w.cf();
142 cl(db, [&](z) {
143 int df;
144 dc;
145 di;
146 cx;
147 auto dg(cu);
148 auto dh(cu);
149 auto dl(cu);
150 for (; cz; df += de) {
151 auto br = reinterpret_cast<T1 *>(cv);
152 auto bs = reinterpret_cast<T1 *>(cv);
153 auto bt = reinterpret_cast<T1 *>(df * ct.x());
154 auto dj = reinterpret_cast<cm *>(dd.cf() + da);
155 for (int dk; dk < cy; dk += cs, dj += cs)
156 if (ct == ao()) {
157 auto vres = bn::bz(br, bs, bt, dg, dh, dl, cn, by);
158 bn::ca<cn>(dj, vres);
159 } else
160 bn::bq(br, bs, bt, dg, dh, dl, ct.v(), cn, by);
161 }
162 });
163 }
164 };
165 template <typename T1, typename cm>
166 void bz(ay dm, int cs, bc *cp, bc *cq, bc *cr, aq cw, int dn, ao ct) {
167 co<T1, cm, 1>::convolve(dm, cs, cp, cq, cr, cw, dn, ct);
168 co<T1, cm, 2>::convolve(dm, cs, cp, cq, cr, cw, dn, ct);
169 }
170 } // namespace
171 void bd::ba(const ay &dm, const s &) {
172 bz<o, p>(dm, bi, be, bg, bf, bh, bj, bk);
173 }
174 } // namespace an