rs6000: Remove redundant guard for float128 mode pattern
[official-gcc.git] / gcc / testsuite / g++.target / powerpc / pr71294.C
blobb0f26956f28ec65afd754fc2c0ed9475239a5da1
1 // { dg-options "-mdejagnu-cpu=power8 -mvsx -O3 -fstack-protector" }
2 // { dg-require-effective-target powerpc_vsx } */
4 // PAR target/71294 failed because RELOAD could not figure how create a V2DI
5 // vector that auto vectorization created with each element being the same
6 // stack address, with stack-protector turned on.
8 class A;
9 template <typename _Tp, int m, int n> class B {
10 public:
11   _Tp val[m * n];
13 class C {
14 public:
15   C(A);
17 struct D {
18   D();
19   unsigned long &operator[](int);
20   unsigned long *p;
22 class A {
23 public:
24   template <typename _Tp, int m, int n> A(const B<_Tp, m, n> &, bool);
25   int rows, cols;
26   unsigned char *data;
27   unsigned char *datastart;
28   unsigned char *dataend;
29   unsigned char *datalimit;
30   D step;
32 template <typename _Tp, int m, int n>
33 A::A(const B<_Tp, m, n> &p1, bool)
34     : rows(m), cols(n) {
35   step[0] = cols * sizeof(_Tp);
36   datastart = data = (unsigned char *)p1.val;
37   datalimit = dataend = datastart + rows * step[0];
39 class F {
40 public:
41   static void compute(C);
42   template <typename _Tp, int m, int n, int nm>
43   static void compute(const B<_Tp, m, n> &, B<_Tp, nm, 1> &, B<_Tp, m, nm> &,
44                       B<_Tp, n, nm> &);
46 D::D() {}
47 unsigned long &D::operator[](int p1) { return p[p1]; }
48 template <typename _Tp, int m, int n, int nm>
49 void F::compute(const B<_Tp, m, n> &, B<_Tp, nm, 1> &, B<_Tp, m, nm> &,
50                 B<_Tp, n, nm> &p4) {
51   A a(p4, false);
52   compute(a);
54 void fn1() {
55   B<double, 4, 4> b, c, e;
56   B<double, 4, 1> d;
57   F::compute(b, d, c, e);