aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/torture/pr60438-1.C
blob: 748295aabe048003549afdb321aef55a1a3cfd8e (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
// { dg-do compile }
// { dg-options "-fomit-frame-pointer" }

struct A { int a; };
struct B { A foo (); };
struct C { B *foo (); };
int foo (struct C *, float);
void bar (struct C *);
void baz (struct A *);
int a, b, c;

int
foo (struct C *y, float x)
{
  struct A d;
  if (c)
    bar (y);
  else
    {
      C g;
      g.foo ()->foo ();
      a = b;
      d.a = (int) (b * x);
    }
  baz (&d);
}