Debian Codegraph @

gcc/testsuite/g++.dg/vect/pr116674.cc

raw
1 // { dg-do compile }
2 // { dg-require-effective-target c++11 }
3 // { dg-additional-options "-Ofast" }
4 // { dg-additional-options "-march=x86-64-v3" { target { x86_64-*-* i?86-*-* } } }
5
6 namespace std {
7 typedef int a;
8 template <typename> struct b;
9 template <typename> class aa {};
10 template <typename c> c d(c e, c) { return e; }
11 template <typename c> struct b<aa<c>> {
12 using f = c;
13 using g = c *;
14 template <typename h> using j = aa<h>;
15 };
16 } // namespace std
17 namespace l {
18 template <typename ab> struct m : std::b<ab> {
19 typedef std::b<ab> n;
20 typedef typename n::f &q;
21 template <typename c> struct ac { typedef typename n::j<c> ad; };
22 };
23 } // namespace l
24 namespace std {
25 template <typename c, typename ab> struct o {
26 typedef typename l::m<ab>::ac<c>::ad ae;
27 typedef typename l::m<ae>::g g;
28 struct p {
29 g af;
30 };
31 struct ag : p {
32 ag(ae) {}
33 };
34 typedef ab u;
35 o(a, u e) : ah(e) {}
36 ag ah;
37 };
38 template <typename c, typename ab = aa<c>> class r : o<c, ab> {
39 typedef o<c, ab> s;
40 typedef typename s::ae ae;
41 typedef l::m<ae> w;
42
43 public:
44 c f;
45 typedef typename w::q q;
46 typedef a t;
47 typedef ab u;
48 r(t x, u e = u()) : s(ai(x, e), e) {}
49 q operator[](t x) { return *(this->ah.af + x); }
50 t ai(t x, u) { return x; }
51 };
52 extern "C" __attribute__((__simd__)) double exp(double);
53 } // namespace std
54 using namespace std;
55 int ak;
56 double v, y;
57 void am(double, int an, double, double, double, double, double, double, double,
58 double, double, double, int, double, double, double, double,
59 r<double> ap, double, double, double, double, double, double, double,
60 double, r<double> ar, r<double> as, double, double, r<double> at,
61 r<double> au, r<double> av, double, double) {
62 double ba;
63 for (int k;;)
64 for (int i; i < an; ++i) {
65 y = i;
66 v = d(y, 25.0);
67 ba = exp(v);
68 ar[i * (ak + 1)] = ba;
69 as[i * (ak + 1)] = ar[i * (ak + 1)];
70 if (k && ap[k]) {
71 at[i * (ak + 1)] = av[i * (ak + 1)] = as[i * (ak + 1)];
72 au[i * (ak + 1)] = ar[i * (ak + 1)];
73 } else {
74 au[i * (ak + 1)] = ba;
75 at[i * (ak + 1)] = av[i * (ak + 1)] = k;
76 }
77 }
78 }
79 void b(int bc) {
80 double bd, be, bf, bg, bh, ao, ap, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx,
81 by, aq, ar, as, bz, ca, at, au, av, cb, aw;
82 int bi;
83 am(bh, bc, bi, bi, bi, bi, bv, bw, bx, by, bu, bt, bi, ao, bn, bo, bp, ap, bq,
84 br, bs, bd, be, bf, bg, aq, ar, as, bz, ca, at, au, av, cb, aw);
85 }