aboutsummaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index f1b8eb9..99b02ba 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -3322,14 +3322,17 @@ prev_label (rtx insn)
return insn;
}
-/* Return the last label to mark the same position as LABEL. Return null
- if LABEL itself is null. */
+/* Return the last label to mark the same position as LABEL. Return LABEL
+ itself if it is null or any return rtx. */
rtx
skip_consecutive_labels (rtx label)
{
rtx insn;
+ if (label && ANY_RETURN_P (label))
+ return label;
+
for (insn = label; insn != 0 && !INSN_P (insn); insn = NEXT_INSN (insn))
if (LABEL_P (insn))
label = insn;