diff options
author | Jan Hubicka <jh@suse.cz> | 2009-07-11 21:03:52 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2009-07-11 19:03:52 +0000 |
commit | 6b45de0060d6c073441e781e6c96f66f71a1a98a (patch) | |
tree | f74298a3fbafd78eaff71ccc122bf70f004a10b7 /gcc | |
parent | b0159fbee916e3bbeb2d661b40ae4483a0bcb9b7 (diff) | |
download | gcc-6b45de0060d6c073441e781e6c96f66f71a1a98a.zip gcc-6b45de0060d6c073441e781e6c96f66f71a1a98a.tar.gz gcc-6b45de0060d6c073441e781e6c96f66f71a1a98a.tar.bz2 |
re PR middle-end/40388 (another null pointer in remove_unreachable_regions)
PR middle-end/48388
* except.c (can_be_reached_by_runtime): Test for NULL aka bitmap.
* g++.dg/torture/pr40388.C: New testcase.
From-SVN: r149516
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/except.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/torture/pr40388.C | 42 |
4 files changed, 53 insertions, 1 deletions
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 <jh@suse.cz> + + PR middle-end/48388 + * except.c (can_be_reached_by_runtime): Test for NULL aka bitmap. + 2009-07-11 Jakub Jelinek <jakub@redhat.com> 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 <jh@suse.cz> + + PR middle-end/48388 + * g++.dg/torture/pr40388.C: New testcase. + 2009-07-11 Jakub Jelinek <jakub@redhat.com> 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; +} |