| 1 |
/* PR target/114416 */ |
| 2 |
/* Reported by Rainer Orth <[email protected]> */ |
| 3 |
|
| 4 |
/* { dg-do compile } */ |
| 5 |
/* { dg-options "-O" } */ |
| 6 |
/* { dg-require-effective-target lp64 } */ |
| 7 |
|
| 8 |
struct vec2 |
| 9 |
{ |
| 10 |
double x[2]; |
| 11 |
}; |
| 12 |
|
| 13 |
struct vec2x |
| 14 |
{ |
| 15 |
double x; |
| 16 |
double y; |
| 17 |
}; |
| 18 |
|
| 19 |
struct vec2 sum2 (double val) |
| 20 |
{ |
| 21 |
struct vec2 v; |
| 22 |
v.x[0] = val; |
| 23 |
v.x[1] = val; |
| 24 |
return v; |
| 25 |
} |
| 26 |
|
| 27 |
struct vec2x sum2x (double val) |
| 28 |
{ |
| 29 |
struct vec2x v; |
| 30 |
v.x = val; |
| 31 |
v.y = val; |
| 32 |
return v; |
| 33 |
} |
| 34 |
|
| 35 |
double get2 (struct vec2 v) |
| 36 |
{ |
| 37 |
return v.x[0] + v.x[1]; |
| 38 |
} |
| 39 |
|
| 40 |
double get2x (struct vec2x v) |
| 41 |
{ |
| 42 |
return v.x + v.y; |
| 43 |
} |
| 44 |
|
| 45 |
/* { dg-final { scan-assembler-not "ldx" } } */ |
| 46 |
/* { dg-final { scan-assembler-not "stx" } } */ |