strub: enable conditional support
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr88149.C
blob2700a0917404328f2b7a229a6fb6765c6bbdc62f
1 // { dg-do compile }
2 // { dg-additional-options "-ftree-vectorize" }
4 template <typename> struct a;
5 template <typename b> struct a<b *> {
6   typedef long c;
7   typedef b &d;
8 };
9 template <typename e> class f {
10   e ab;
11   typedef a<e> ac;
13 public:
14   typename ac::d operator[](typename ac::c o) { return ab[o]; }
16 template <typename> struct au;
17 template <typename b> au<b> operator+(au<b> o, au<b> p2) {
18   au<b> ax = o;
19   ax += p2;
20   return ax;
22 template <typename b> au<b> operator-(au<b> o, au<b> p2) {
23   au<b> ax = o;
24   ax -= p2;
25   return ax;
27 template <typename b> au<b> operator*(au<b>, au<b> &p2) {
28   au<b> ax;
29   ax *= p2;
30   return ax;
32 template <> struct au<double> {
33   double p() { return __real__ az; }
34   double q() { return __imag__ az; }
35   void operator+=(au o) {
36     az += o.p();
37     __imag__ az += o.q();
38   }
39   void operator-=(au o) {
40     az -= o.p();
41     __imag__ az -= o.q();
42   }
43   void operator*=(au &o) {
44     _Complex bd = o.p();
45     __imag__ bd = o.q();
46     az *= bd;
47   }
48   _Complex az;
50 long bm, m;
51 f<au<double> *> g;
52 au<double> h, i, l;
53 void bn() {
54   au<double> bq;
55   for (long k; m;) {
56     au<double> br;
57     for (long j = 0; j < bm; ++j) {
58       au<double> n = br * h;
59       i = l + n;
60       g[k] = l - bq;
61     }
62   }