| 1 |
/* PR rtl-optimization/94516 */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-additional-options "-fpie" { target pie } } */ |
| 4 |
|
| 5 |
struct S { unsigned char *a; unsigned int b; }; |
| 6 |
typedef int V __attribute__((vector_size (sizeof (int) * 4))); |
| 7 |
|
| 8 |
__attribute__((noipa)) void |
| 9 |
foo (const char *a, const char *b, const char *c, const struct S *d, int e, int f, int g, int h, int i) |
| 10 |
{ |
| 11 |
V v = { 1, 2, 3, 4 }; |
| 12 |
asm volatile ("" : : "g" (&v) : "memory"); |
| 13 |
v += (V) { 5, 6, 7, 8 }; |
| 14 |
asm volatile ("" : : "g" (&v) : "memory"); |
| 15 |
} |
| 16 |
|
| 17 |
__attribute__((noipa)) void |
| 18 |
bar (void) |
| 19 |
{ |
| 20 |
const struct S s = { "foobarbaz", 9 }; |
| 21 |
foo ("foo", (const char *) 0, "corge", &s, 0, 1, 0, -12, -31); |
| 22 |
foo ("bar", "quux", "qux", &s, 0, 0, 9, 0, 0); |
| 23 |
foo ("baz", (const char *) 0, "qux", &s, 1, 0, 0, -12, -32); |
| 24 |
} |
| 25 |
|
| 26 |
int |
| 27 |
main () |
| 28 |
{ |
| 29 |
bar (); |
| 30 |
return 0; |
| 31 |
} |