1 // PR debug/46338
2 // { dg-do compile }
3 // { dg-require-profiling "-fprofile-generate" }
4 // { dg-options "-O -fprofile-generate -fcompare-debug" }
5 
6 void bar ();
7 
8 struct S
9 {
fS10   int f ()
11   {
12   }
13 };
14 
15 S *s;
16 
17 void
foo(int x)18 foo (int x)
19 {
20   if (x)
21     return;
22   bar ();
23   for (int j = 0; j < s->f (); j++)
24     ;
25 }
26