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; barS10 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 foo()22foo () 23 { 24 while (baz () && s->bar ()) 25 ; 26 } 27