| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-O2" } */ |
| 3 |
|
| 4 |
struct pack |
| 5 |
{ |
| 6 |
int fine; |
| 7 |
int victim; |
| 8 |
int killer; |
| 9 |
}; |
| 10 |
|
| 11 |
int __attribute__ ((__noinline__, __noclone__)) |
| 12 |
bar (int a, int b, struct pack p) |
| 13 |
{ |
| 14 |
if (a != 20 || b != 30) |
| 15 |
__builtin_abort (); |
| 16 |
if (p.fine != 40 || p.victim != 50 || p.killer != 60) |
| 17 |
__builtin_abort (); |
| 18 |
return 0; |
| 19 |
} |
| 20 |
|
| 21 |
int __attribute__ ((__noinline__, __noclone__)) |
| 22 |
foo (int arg1, int arg2, int arg3, struct pack p) |
| 23 |
{ |
| 24 |
return bar (arg2, arg3, p); |
| 25 |
} |
| 26 |
|
| 27 |
int main (void) |
| 28 |
{ |
| 29 |
struct pack p = { 40, 50, 60 }; |
| 30 |
|
| 31 |
(void) foo (10, 20, 30, p); |
| 32 |
return 0; |
| 33 |
} |