| 1 |
// PR debug/96354 |
| 2 |
// { dg-do compile } |
| 3 |
// { dg-options "-O2 -g -fopenmp-simd" } |
| 4 |
|
| 5 |
template <int N> struct A { typedef double T[N]; }; |
| 6 |
template <int N> struct B { typename A<N>::T b; double *baz () { return b; } }; |
| 7 |
template <int N> struct C { B<N> d; C (); }; |
| 8 |
template <int N> C<N>::C () { double c = *d.baz (); } |
| 9 |
template <int N> void operator- (C<N>, const C<N> &); |
| 10 |
template <int> struct D {}; |
| 11 |
template <int N, int M> C<N> foo (D<N>, C<M>) { C<N> t; return t; } |
| 12 |
int e; |
| 13 |
struct E { D<3> d; void bar (); }; |
| 14 |
|
| 15 |
void |
| 16 |
E::bar () |
| 17 |
{ |
| 18 |
#pragma omp simd |
| 19 |
for (int i = 0; i < e; i++) |
| 20 |
{ |
| 21 |
C<3> f, g; |
| 22 |
g - foo (d, f); |
| 23 |
} |
| 24 |
} |