From: hubicka Date: Sat, 11 Jul 2009 19:03:52 +0000 (+0000) Subject: PR middle-end/48388 X-Git-Tag: upstream/4.9.2~34922 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6af7af33b50c569063e44a446f896bdb4acb26ac;p=platform%2Fupstream%2Flinaro-gcc.git PR middle-end/48388 * except.c (can_be_reached_by_runtime): Test for NULL aka bitmap. * g++.dg/torture/pr40388.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149516 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e84fabc..5bdc4be 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-07-11 Jan Hubicka + + PR middle-end/48388 + * except.c (can_be_reached_by_runtime): Test for NULL aka bitmap. + 2009-07-11 Jakub Jelinek PR debug/40713 diff --git a/gcc/except.c b/gcc/except.c index 95163cc..4fce026 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -565,7 +565,7 @@ can_be_reached_by_runtime (sbitmap contains_stmt, struct eh_region_d *r) if (i->type != ERT_MUST_NOT_THROW) { bool found = TEST_BIT (contains_stmt, i->region_number); - if (!found) + if (!found && i->aka) EXECUTE_IF_SET_IN_BITMAP (i->aka, 0, n, bi) if (TEST_BIT (contains_stmt, n)) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 87d5708..36a9bd3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-07-11 Jan Hubicka + + PR middle-end/48388 + * g++.dg/torture/pr40388.C: New testcase. + 2009-07-11 Jakub Jelinek PR target/40668 diff --git a/gcc/testsuite/g++.dg/torture/pr40388.C b/gcc/testsuite/g++.dg/torture/pr40388.C new file mode 100644 index 0000000..0d74b9f --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr40388.C @@ -0,0 +1,42 @@ +void foo(); + +struct A +{ + ~A() + { + try + { + foo(); + foo(); + } + catch (...) + { + } + } +}; + +void bar() +{ + A a1, a2; +} +void foo(); + +struct A +{ + ~A() + { + try + { + foo(); + foo(); + } + catch (...) + { + } + } +}; + +void bar() +{ + A a1, a2; +}