Debian Codegraph @

gcc/testsuite/g++.dg/torture/pr60438-1.C

raw
1 // { dg-do compile }
2 // { dg-options "-fomit-frame-pointer" }
3
4 struct A { int a; };
5 struct B { A foo (); };
6 struct C { B *foo (); };
7 int foo (struct C *, float);
8 void bar (struct C *);
9 void baz (struct A *);
10 int a, b, c;
11
12 int
13 foo (struct C *y, float x)
14 {
15 struct A d;
16 if (c)
17 bar (y);
18 else
19 {
20 C g;
21 g.foo ()->foo ();
22 a = b;
23 d.a = (int) (b * x);
24 }
25 baz (&d);
26
27 return 0;
28 }