gcc/testsuite/g++.dg/torture/pr119610.C
raw| 1 | // { dg-do run } |
| 2 | // { dg-additional-options "-fstack-protector-strong" { target fstack_protector } } |
| 3 | // { dg-additional-options "-fstack-clash-protection" { target supports_stack_clash_protection } } |
| 4 | |
| 5 | int *ptr; |
| 6 | void foo() { |
| 7 | int c[1024*128]; |
| 8 | ptr = c; |
| 9 | throw 1; |
| 10 | } |
| 11 | int main() |
| 12 | { |
| 13 | try { |
| 14 | foo(); |
| 15 | } catch(int x) { |
| 16 | return 0; |
| 17 | } |
| 18 | } |