summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-29 20:34:20 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-29 20:34:20 +0000
commit015fda077b77792502484bbe04808b35a9de4f68 (patch)
tree215ff1b5a887794d50cd4f28d9a0b590b5cc3c75 /gcc/varasm.c
parentfec9182b4c89253528f590b513984c0a1f0582c0 (diff)
downloadgcc-015fda077b77792502484bbe04808b35a9de4f68.tar.gz
* varasm.c (output_constant_def): Don't ENCODE_SECTION_INFO
twice. Update desc->rtl and ->label, in case ENCODE_SECTION_INFO modifies them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38551 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 8f76f45f719..0ebcbd9da2a 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