summaryrefslogtreecommitdiffstats
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authoramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-25 13:33:17 +0000
committeramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-25 13:33:17 +0000
commit28d202a81916cc3110066b0fcd2d3d3af8ebccb8 (patch)
treee7c323638a787cb35876771b5347818a79319262 /gcc/stmt.c
parentbb1764752f54c8bf35b65c72204d5e47211fc7c8 (diff)
downloadppe42-gcc-28d202a81916cc3110066b0fcd2d3d3af8ebccb8.tar.gz
ppe42-gcc-28d202a81916cc3110066b0fcd2d3d3af8ebccb8.zip
2001-07-25 Andrew MacLeod <amacleod@redhat.com>
Janis Johnson <janis@us.ibm.com> * stmt.c (expand_goto): A nonlocal goto can be a call too. * builtins.c (expand_builtin_longjmp): Reverse label and static chain pointer parameters to match documented usage of nonlocal_goto. * config/ia64/ia64.md (nonlocal_goto): Revert label and static chain parameters to their correct order. * config/sparc/sparc.md (nonlocal_goto): Revert label and static chain parameters to their correct order. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44353 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index c95db81de4a..169291656d9 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -842,12 +842,17 @@ expand_goto (label)
/* Search backwards to the jump insn and mark it as a
non-local goto. */
- for (insn = get_last_insn ();
- GET_CODE (insn) != JUMP_INSN;
- insn = PREV_INSN (insn))
- continue;
- REG_NOTES (insn) = alloc_EXPR_LIST (REG_NON_LOCAL_GOTO, const0_rtx,
- REG_NOTES (insn));
+ for (insn = get_last_insn (); insn; insn = PREV_INSN (insn))
+ {
+ if (GET_CODE (insn) == JUMP_INSN)
+ {
+ REG_NOTES (insn) = alloc_EXPR_LIST (REG_NON_LOCAL_GOTO,
+ const0_rtx, REG_NOTES (insn));
+ break;
+ }
+ else if (GET_CODE (insn) == CALL_INSN)
+ break;
+ }
}
else
expand_goto_internal (label, label_rtx (label), NULL_RTX);
OpenPOWER on IntegriCloud