2014-12-24 Andrew Stubbs <ams@codesourcery.com>
PR testsuite/64032
* gcc.dg/undefined-loop-2.c: Don't allow GCC to optimize away the
loop exits too early.
From-SVN: r219059
+2014-12-24 Andrew Stubbs <ams@codesourcery.com>
+
+ PR testsuite/64032
+ * gcc.dg/undefined-loop-2.c: Don't allow GCC to optimize away the
+ loop exits too early.
+
2014-12-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/63985
(p
? array1[i] /* { dg-message "note: possible undefined statement is here" } */
: array2[i]) /* { dg-message "note: possible undefined statement is here" } */
- && i < 5 /* { dg-warning "loop exit may only be reached after undefined behavior" } */
&& i < 100; /* { dg-warning "loop exit may only be reached after undefined behavior" } */
i++)
- doSomething(array1[i]);
+ {
+ if (i >= 5) /* { dg-warning "loop exit may only be reached after undefined behavior" } */
+ break;
+ doSomething(array1[i]);
+ }
}