summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/life1.C
blob: dd840f9abec1afea8b8c324e9c2f7b92a3cf42e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// This testcase did not set up the pic register on IA-32 due
// to bug in calculate_global_regs_live EH edge handling.
// { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && ia32 } } }
// { dg-require-effective-target fpic }
// { dg-options "-O2 -fPIC" }

struct A { };

void foo (A (*fn)())
{
  try {
    A a = fn ();
  } catch (...) {
  }
}

// { dg-final { scan-assembler "GLOBAL_OFFSET_TABLE" } }