aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/pr24231-2.C
blob: 188b1a26b46048175b6939f61eab73708bd416ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* FRE testcase for PR 24231, problem with PRE coalescing abnormal phis.  */
struct f
{
  int i;
};
struct h{h();};
int g(void);
int g1(void) throw();
int h2222(f*);
void ghh(int);

int main(void)
{
  int i;
  f t;
  try
  {
    i = g1();
    try
    {
      i = g();
    }catch(...)
    {}
    int j = i;
    try
    {
      i = g();
    }catch(...)
    {}
    t.i = j;
    i = 2;
    int h = t.i;
    ghh (h);

    g();
  }catch(...)
  {}
  return i;
}