Debian Codegraph @

gcc/testsuite/g++.dg/opt/pr46864.C

raw
1 // PR tree-optimization/46864
2 // { dg-do compile }
3 // { dg-options "-O -fnon-call-exceptions" }
4
5 int baz ();
6
7 struct S
8 {
9 int k;
10 bool bar () throw ()
11 {
12 int m = baz ();
13 for (int i = 0; i < m; i++)
14 k = i;
15 return m;
16 }
17 };
18
19 extern S *s;
20
21 void
22 foo ()
23 {
24 while (baz () && s->bar ())
25 ;
26 }