gcc/testsuite/gcc.target/i386/ssp-strong-reg.c
raw| 1 | /* Test that structs returned in registers do not lead to |
| 2 | instrumentation with -fstack-protector-strong. */ |
| 3 | |
| 4 | /* { dg-do compile { target { ! ia32 } } } */ |
| 5 | /* { dg-options "-O2 -fstack-protector-strong" } */ |
| 6 | |
| 7 | struct S { |
| 8 | int a; |
| 9 | int b; |
| 10 | }; |
| 11 | |
| 12 | struct S f (void); |
| 13 | |
| 14 | int g (void) |
| 15 | { |
| 16 | return f ().a; |
| 17 | } |
| 18 | |
| 19 | /* { dg-final { scan-assembler-times "stack_chk_fail" 0 } } */ |