| 1 |
/* PR target/118940 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-Os" } */ |
| 4 |
/* { dg-additional-options "-march=i386 -mregparm=3" { target ia32 } } */ |
| 5 |
/* { dg-additional-options "-fno-pie" { target pie } } */ |
| 6 |
|
| 7 |
struct A { int a[10]; }; |
| 8 |
void *b; |
| 9 |
long c; |
| 10 |
char d[100]; |
| 11 |
int e; |
| 12 |
void foo (void *, void *, void *); |
| 13 |
|
| 14 |
void |
| 15 |
bar (int *x, int y, void *z, int w) |
| 16 |
{ |
| 17 |
(void) y; |
| 18 |
struct A *f = (void *) x; |
| 19 |
asm ("" : "=&D" (b), "=&c" (c), "+m" (*f) : "r" (z), "0" (x), "1" (w) : "eax"); |
| 20 |
} |
| 21 |
|
| 22 |
void |
| 23 |
baz (void) |
| 24 |
{ |
| 25 |
struct A g, h; |
| 26 |
struct B { int a[e]; } i; |
| 27 |
bar (h.a, 0, d, 0); |
| 28 |
bar (i.a, 0, (void *) baz, 0); |
| 29 |
foo (&g, &h, &i); |
| 30 |
} |