aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-10-29 17:30:41 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1992-10-29 17:30:41 -0500
commit7b2b3f1f705c1ea27e9b2ccee7e5f369a0f32b44 (patch)
tree15eb78cfae71b05e21ae6c76639cb976bac1a14e
parent6ba17bb0914eab65f7bc68476b3a17f372d2a645 (diff)
downloadgcc-7b2b3f1f705c1ea27e9b2ccee7e5f369a0f32b44.zip
gcc-7b2b3f1f705c1ea27e9b2ccee7e5f369a0f32b44.tar.gz
gcc-7b2b3f1f705c1ea27e9b2ccee7e5f369a0f32b44.tar.bz2
(output_constant_pool): Labels can be deleted by being turned into
NOTEs, not just have INSN_DELETED_P. From-SVN: r2653
-rw-r--r--gcc/varasm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index e5d757c..0df6d01 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2494,11 +2494,15 @@ output_constant_pool (fnname, fndecl)
/* See if X is a LABEL_REF (or a CONST referring to a LABEL_REF)
whose CODE_LABEL has been deleted. This can occur if a jump table
is eliminated by optimization. If so, write a constant of zero
- instead. */
- if ((GET_CODE (x) == LABEL_REF && INSN_DELETED_P (XEXP (x, 0)))
+ instead. Note that this can also happen by turning the
+ CODE_LABEL into a NOTE. */
+ if (((GET_CODE (x) == LABEL_REF
+ && (INSN_DELETED_P (XEXP (x, 0))
+ || GET_CODE (XEXP (x, 0)) == NOTE)))
|| (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (x, 0), 0)) == LABEL_REF
- && INSN_DELETED_P (XEXP (XEXP (XEXP (x, 0), 0), 0))))
+ && (INSN_DELETED_P (XEXP (XEXP (XEXP (x, 0), 0), 0))
+ || GET_CODE (XEXP (XEXP (XEXP (x, 0), 0), 0)) == NOTE)))
x = const0_rtx;
/* First switch to correct section. */