aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2000-12-29 20:34:20 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2000-12-29 20:34:20 +0000
commite1b4533c2a18bb0ad07d8c05b8088cd9d255be1e (patch)
tree215ff1b5a887794d50cd4f28d9a0b590b5cc3c75 /gcc
parent584932e9b442aba9ff2789426cf9f152db26ad01 (diff)
downloadgcc-e1b4533c2a18bb0ad07d8c05b8088cd9d255be1e.zip
gcc-e1b4533c2a18bb0ad07d8c05b8088cd9d255be1e.tar.gz
gcc-e1b4533c2a18bb0ad07d8c05b8088cd9d255be1e.tar.bz2
varasm.c (output_constant_def): Don't ENCODE_SECTION_INFO twice.
* varasm.c (output_constant_def): Don't ENCODE_SECTION_INFO twice. Update desc->rtl and ->label, in case ENCODE_SECTION_INFO modifies them. From-SVN: r38551
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/varasm.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dcd8be9..487d5ff 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2000-12-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * varasm.c (output_constant_def): Don't ENCODE_SECTION_INFO
+ twice. Update desc->rtl and ->label, in case ENCODE_SECTION_INFO
+ modifies them.
+
2000-12-29 Bernd Schmidt <bernds@redhat.com>
* ia64.c (ia64_expand_load_address): Accept additional scratch
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 8f76f45..0ebcbd9 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -3204,7 +3204,14 @@ output_constant_def (exp, defer)
such as that it is a function name. If the name is changed, the macro
ASM_OUTPUT_LABELREF will have to know how to strip this information. */
#ifdef ENCODE_SECTION_INFO
- ENCODE_SECTION_INFO (exp);
+ /* A previously-processed constant would already have section info
+ encoded in it. */
+ if (! found)
+ {
+ ENCODE_SECTION_INFO (exp);
+ desc->rtl = TREE_CST_RTL (exp);
+ desc->label = XSTR (XEXP (desc->rtl, 0), 0);
+ }
#endif
#ifdef CONSTANT_AFTER_FUNCTION_P