| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-additional-options "-mtune=k8 -mstringop-strategy=rep_8byte" { target { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } */ |
| 3 |
|
| 4 |
struct S { unsigned a[10]; unsigned y; unsigned b[6]; } g[2]; |
| 5 |
|
| 6 |
__attribute__((noinline, noclone)) int |
| 7 |
test (int x) |
| 8 |
{ |
| 9 |
struct S e[2] = { g[0], g[1] }; |
| 10 |
int r = 0; |
| 11 |
if (x >= 0) |
| 12 |
{ |
| 13 |
r++; |
| 14 |
e[1].y++; |
| 15 |
} |
| 16 |
g[1] = e[1]; |
| 17 |
return r; |
| 18 |
} |
| 19 |
|
| 20 |
int |
| 21 |
main () |
| 22 |
{ |
| 23 |
test (1); |
| 24 |
if (g[1].y != 1) |
| 25 |
__builtin_abort (); |
| 26 |
return 0; |
| 27 |
} |