summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-05 16:38:25 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-05 16:38:25 +0000
commit41a1fbdb000b4b490f16e1d46f5000cd06d22e5a (patch)
tree61cc8b37ca09150a483556195e12fa6db9cbc06e
parent1a77e0a962edc3d5a4c7293f881d700c6709dd6e (diff)
downloadppe42-gcc-41a1fbdb000b4b490f16e1d46f5000cd06d22e5a.tar.gz
ppe42-gcc-41a1fbdb000b4b490f16e1d46f5000cd06d22e5a.zip
* except.c (remove_fixup_regions): Adjust REG_EH_REGION notes
to the parent of the fixup region. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41867 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/except.c23
2 files changed, 27 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 83355b1a0a8..3b9b4a60eb0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,9 @@
-2001-05-05 Jakub Jelinek <jakub@redhat.com
+2001-05-05 Richard Henderson <rth@redhat.com>
+
+ * except.c (remove_fixup_regions): Adjust REG_EH_REGION notes
+ to the parent of the fixup region.
+
+2001-05-05 Jakub Jelinek <jakub@redhat.com>
* gcc.c (cpp_options): Define __NO_INLINE__ unless we are honoring
"inline" keyword.
diff --git a/gcc/except.c b/gcc/except.c
index a0158126b2b..b21769c28f9 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1101,11 +1101,30 @@ static void
remove_fixup_regions ()
{
int i;
+ rtx insn, note;
+ struct eh_region *fixup;
+ /* Walk the insn chain and adjust the REG_EH_REGION numbers
+ for instructions referencing fixup regions. This is only
+ strictly necessary for fixup regions with no parent, but
+ doesn't hurt to do it for all regions. */
+ for (insn = get_insns(); insn ; insn = NEXT_INSN (insn))
+ if (INSN_P (insn)
+ && (note = find_reg_note (insn, REG_EH_REGION, NULL))
+ && INTVAL (XEXP (note, 0)) > 0
+ && (fixup = cfun->eh->region_array[INTVAL (XEXP (note, 0))])
+ && fixup->type == ERT_FIXUP)
+ {
+ if (fixup->u.fixup.real_region)
+ XEXP (note, 1) = GEN_INT (fixup->u.fixup.real_region->region_number);
+ else
+ remove_note (insn, note);
+ }
+
+ /* Remove the fixup regions from the tree. */
for (i = cfun->eh->last_region_number; i > 0; --i)
{
- struct eh_region *fixup = cfun->eh->region_array[i];
-
+ fixup = cfun->eh->region_array[i];
if (! fixup)
continue;
OpenPOWER on IntegriCloud