| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target powerpc_prefixed_addr } */ |
| 3 |
/* { dg-require-effective-target lp64 } */ |
| 4 |
/* { dg-options "-O2 -mdejagnu-cpu=power10 -fstack-protector-strong" } */ |
| 5 |
|
| 6 |
/* Test that we can handle large stack frames with -fstack-protector-strong and |
| 7 |
prefixed addressing. This was originally discovered when trying to build |
| 8 |
glibc with -mcpu=power10, and vfwprintf.c failed because it used |
| 9 |
-fstack-protector-strong. It needs 64-bit due to the size of the stack. */ |
| 10 |
|
| 11 |
extern long foo (char *); |
| 12 |
|
| 13 |
long |
| 14 |
bar (void) |
| 15 |
{ |
| 16 |
char buffer[0x20000]; |
| 17 |
return foo (buffer) + 1; |
| 18 |
} |
| 19 |
|
| 20 |
/* { dg-final { scan-assembler {\mpld\M} } } */ |
| 21 |
/* { dg-final { scan-assembler {\mpstd\M} } } */ |