gcc/testsuite/g++.dg/opt/life1.C
raw| 1 | // This testcase did not set up the pic register on IA-32 due |
| 2 | // to bug in calculate_global_regs_live EH edge handling. |
| 3 | // { dg-do compile { target { { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } && ia32 } } } |
| 4 | // { dg-require-effective-target fpic } |
| 5 | // { dg-options "-O2 -fPIC" } |
| 6 | |
| 7 | struct A { }; |
| 8 | |
| 9 | void foo (A (*fn)()) |
| 10 | { |
| 11 | try { |
| 12 | A a = fn (); |
| 13 | } catch (...) { |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | // { dg-final { scan-assembler "GLOBAL_OFFSET_TABLE" } } |