Commit 6391db68 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/46864 (ICE: verify_stmts failed: statement marked for…

re PR tree-optimization/46864 (ICE: verify_stmts failed: statement marked for throw, but doesn't with -fnon-call-exceptions)

	PR tree-optimization/46864
	* tree-ssa-loop-im.c (loop_suitable_for_sm): Return false even
	when there are EDGE_EH exit edges.

	* g++.dg/opt/pr46864.C: New test.

From-SVN: r167685
parent 87e6d9dc
2010-12-10 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/46864
* tree-ssa-loop-im.c (loop_suitable_for_sm): Return false even
when there are EDGE_EH exit edges.
2010-12-10 Tobias Burnus <burnus@net-b.de>
PR fortran/46540
2010-12-10 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/46864
* g++.dg/opt/pr46864.C: New test.
2010-12-10 Jack Howarth <howarth@bromo.med.uc.edu>
Iain Sandoe <iains@gcc.gnu.org>
......
// PR tree-optimization/46864
// { dg-do compile }
// { dg-options "-O -fnon-call-exceptions" }
int baz ();
struct S
{
int k;
bool bar () throw ()
{
int m = baz ();
for (int i = 0; i < m; i++)
k = i;
return m;
}
};
extern S *s;
void
foo ()
{
while (baz () && s->bar ())
;
}
......@@ -2369,7 +2369,7 @@ loop_suitable_for_sm (struct loop *loop ATTRIBUTE_UNUSED,
edge ex;
FOR_EACH_VEC_ELT (edge, exits, i, ex)
if (ex->flags & EDGE_ABNORMAL)
if (ex->flags & (EDGE_ABNORMAL | EDGE_EH))
return false;
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment