| 1 |
/* { dg-do run { target { lp64 && fpic } } } */ |
| 2 |
/* { dg-options "-O2 -fpic -fprofile -mcmodel=large" } */ |
| 3 |
/* { dg-require-profiling "-fprofile" } */ |
| 4 |
/* { dg-skip-if "PR90698" { *-*-darwin* } } */ |
| 5 |
/* { dg-skip-if "PR113909" { *-*-solaris2* } } */ |
| 6 |
|
| 7 |
__attribute__((noipa)) |
| 8 |
void |
| 9 |
bar (int a1, int a2, int a3, int a4, int a5, int a6, |
| 10 |
char *x, char *y, int *z) |
| 11 |
{ |
| 12 |
if (a1 != 1) |
| 13 |
__builtin_abort (); |
| 14 |
if (a2 != 2) |
| 15 |
__builtin_abort (); |
| 16 |
if (a3 != 3) |
| 17 |
__builtin_abort (); |
| 18 |
if (a4 != 4) |
| 19 |
__builtin_abort (); |
| 20 |
if (a5 != 5) |
| 21 |
__builtin_abort (); |
| 22 |
if (a6 != 6) |
| 23 |
__builtin_abort (); |
| 24 |
x[0] = 42; |
| 25 |
y[0] = 42; |
| 26 |
if (z[0] != 16) |
| 27 |
__builtin_abort (); |
| 28 |
} |
| 29 |
|
| 30 |
__attribute__((noipa)) |
| 31 |
void |
| 32 |
foo (int c, int d, int e, int f, int g, int h, int z) |
| 33 |
{ |
| 34 |
typedef char B[32]; |
| 35 |
B b __attribute__((aligned (32))); |
| 36 |
bar (c, d, e, f, g, h, &b[0], __builtin_alloca (z), &z); |
| 37 |
} |
| 38 |
|
| 39 |
int |
| 40 |
main () |
| 41 |
{ |
| 42 |
foo (1, 2, 3, 4, 5, 6, 16); |
| 43 |
return 0; |
| 44 |
} |