Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / pr68672-2.C
blobf23ae80c7a2a67b528117276ac833c6e4c0f91ec
1 // PR ipa/68672
2 // { dg-do compile }
3 // { dg-options "-O3 --param=partial-inlining-entry-probability=100 -g" }
5 struct S { ~S () {} };
6 S *a;
7 int *b;
8 void bar ();
9 void baz ();
10 void fn (int *);
12 static int
13 foo ()
15   S *c = a;
16   if (c)
17     {
18       bar ();
19       if (a)
20         __builtin_abort ();
21       baz ();
22     }
23   int p = *b;
24   if (p)
25     {
26       fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
27       fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
28       fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
29       fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b); fn (b);
30     }
31   c->~S ();
32   int q = 2 * p;
33   int r = 3 * q;
34   S *d = c;
35   return p;
38 void
39 use1 ()
41   foo ();
44 void
45 use2 ()
47   foo ();
50 void
51 use3 ()
53   foo ();