summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index de4479ccac9..cd4a2306925 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2922,7 +2922,8 @@ const_hash_1 (const tree exp)
break;
case LABEL_REF:
- hi = value.offset + CODE_LABEL_NUMBER (XEXP (value.base, 0)) * 13;
+ hi = (value.offset
+ + CODE_LABEL_NUMBER (LABEL_REF_LABEL (value.base)) * 13);
break;
default:
@@ -3112,8 +3113,8 @@ compare_constant (const tree t1, const tree t2)
break;
case LABEL_REF:
- ret = (CODE_LABEL_NUMBER (XEXP (value1.base, 0))
- == CODE_LABEL_NUMBER (XEXP (value2.base, 0)));
+ ret = (CODE_LABEL_NUMBER (LABEL_REF_LABEL (value1.base))
+ == CODE_LABEL_NUMBER (LABEL_REF_LABEL (value2.base)));
break;
default:
@@ -3547,7 +3548,7 @@ const_rtx_hash_1 (const_rtx x)
break;
case LABEL_REF:
- h = h * 251 + CODE_LABEL_NUMBER (XEXP (x, 0));
+ h = h * 251 + CODE_LABEL_NUMBER (LABEL_REF_LABEL (x));
break;
case UNSPEC:
@@ -3835,7 +3836,7 @@ output_constant_pool_1 (struct constant_descriptor_rtx *desc,
/* FALLTHRU */
case LABEL_REF:
- tmp = XEXP (tmp, 0);
+ tmp = LABEL_REF_LABEL (tmp);
gcc_assert (!INSN_DELETED_P (tmp));
gcc_assert (!NOTE_P (tmp)
|| NOTE_KIND (tmp) != NOTE_INSN_DELETED);