repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tree-optimization/114659 - VN and FP to int punning
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
gomp
/
pr60682.C
blob
fdd7a204c770583935fbd8aa7dc34429b7567fec
1
// PR middle-end/60682
2
// { dg-do compile }
3
// { dg-options "-O2 -fopenmp-simd" }
4
5
struct A
6
{
7
float a;
8
A () {}
9
A (const A &x) { a = x.a; }
10
};
11
12
struct B
13
{
14
A a[16];
15
};
16
17
struct C
18
{
19
float a[1];
20
C () {}
21
C (const C &x) { a[0] = x.a[0]; }
22
};
23
24
struct D
25
{
26
C a[16];
27
};
28
29
void
30
foo (int x, B &y, D &z)
31
{
32
#pragma omp simd
33
for (int i = 0; i < x; ++i)
34
{
35
A a;
36
y.a[i] = a;
37
}
38
#pragma omp simd
39
for (int i = 0; i < x; ++i)
40
{
41
C a;
42
z.a[i] = a;
43
}
44
}