gcc/testsuite/gcc.target/s390/warn-dynamicstack-1.c
raw| 1 | /* Check that the stack pointer is decreased only once in a funtion with |
| 2 | runtime aligned stack variables and -mwarn-dynamicstack does not generate a |
| 3 | warning. */ |
| 4 | |
| 5 | /* { dg-do compile { target { s390*-*-* } } } */ |
| 6 | /* { dg-options "-O2 -mwarn-dynamicstack" } */ |
| 7 | |
| 8 | extern int bar (char *pl); |
| 9 | |
| 10 | int foo (long size) |
| 11 | { |
| 12 | char __attribute__ ((aligned(16))) l = size; |
| 13 | |
| 14 | return bar (&l); |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-assembler-times "%r15,-" 1 } } */ |