aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index a92abb4..6019b5a 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -3385,6 +3385,10 @@ output_addressed_constants (tree exp)
tem = TREE_OPERAND (tem, 0))
;
+ /* If we have an initialized CONST_DECL, retrieve the initializer. */
+ if (TREE_CODE (tem) == CONST_DECL && DECL_INITIAL (tem))
+ tem = DECL_INITIAL (tem);
+
if (CONSTANT_CLASS_P (tem) || TREE_CODE (tem) == CONSTRUCTOR)
output_constant_def (tem, 0);
break;