diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-25 13:33:17 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-25 13:33:17 +0000 |
commit | 28d202a81916cc3110066b0fcd2d3d3af8ebccb8 (patch) | |
tree | e7c323638a787cb35876771b5347818a79319262 /gcc/stmt.c | |
parent | bb1764752f54c8bf35b65c72204d5e47211fc7c8 (diff) | |
download | ppe42-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.c | 17 |
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); |