blob: fdd7a204c770583935fbd8aa7dc34429b7567fec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// PR middle-end/60682
// { dg-do compile }
// { dg-options "-O2 -fopenmp-simd" }
struct A
{
float a;
A () {}
A (const A &x) { a = x.a; }
};
struct B
{
A a[16];
};
struct C
{
float a[1];
C () {}
C (const C &x) { a[0] = x.a[0]; }
};
struct D
{
C a[16];
};
void
foo (int x, B &y, D &z)
{
#pragma omp simd
for (int i = 0; i < x; ++i)
{
A a;
y.a[i] = a;
}
#pragma omp simd
for (int i = 0; i < x; ++i)
{
C a;
z.a[i] = a;
}
}
|