| 1 |
/* { dg-additional-options "-mavx2" { target avx_runtime } } */ |
| 2 |
|
| 3 |
#include "tree-vect.h" |
| 4 |
|
| 5 |
extern void abort (void); |
| 6 |
|
| 7 |
struct X { double x; double y; }; |
| 8 |
|
| 9 |
void __attribute__((noinline,noclone)) |
| 10 |
foo (struct X *x, double px, int s) |
| 11 |
{ |
| 12 |
int i; |
| 13 |
for (i = 0; i < 256; ++i) |
| 14 |
{ |
| 15 |
x[i*s].x = px; |
| 16 |
x[i*s].y = i + px; |
| 17 |
} |
| 18 |
} |
| 19 |
|
| 20 |
int main() |
| 21 |
{ |
| 22 |
struct X x[512]; |
| 23 |
int i; |
| 24 |
check_vect (); |
| 25 |
foo (x, 1., 2); |
| 26 |
if (x[0].x != 1. || x[0].y != 1. |
| 27 |
|| x[510].x != 1. || x[510].y != 256.) |
| 28 |
abort (); |
| 29 |
return 0; |
| 30 |
} |