From 3571ae2e08289a7f84999a095a40923c2365259e Mon Sep 17 00:00:00 2001 From: Rafael Avila de Espindola Date: Tue, 22 Jul 2008 13:29:31 +0000 Subject: [PATCH] c-typeck.c (build_external_ref): Don't call assemble_external. 2008-07-22 Rafael Avila de Espindola * c-typeck.c (build_external_ref): Don't call assemble_external. * final.c (output_operand): Call assemble_external. From-SVN: r138057 --- gcc/ChangeLog | 5 +++++ gcc/c-typeck.c | 2 -- gcc/final.c | 8 ++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 951d26375d1..4d05bef2957 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-07-22 Rafael Avila de Espindola + + * c-typeck.c (build_external_ref): Don't call assemble_external. + * final.c (output_operand): Call assemble_external. + 2008-07-21 DJ Delorie * config/h8300/h8300.c (h8300_hard_regno_scratch_ok): New. diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index dafce2ac23c..a47d6324293 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -2191,8 +2191,6 @@ build_external_ref (tree id, int fun, location_t loc) /* Recursive call does not count as usage. */ if (ref != current_function_decl) { - if (!skip_evaluation) - assemble_external (ref); TREE_USED (ref) = 1; } diff --git a/gcc/final.c b/gcc/final.c index f27e4308741..787c43abad5 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -3344,6 +3344,14 @@ output_operand (rtx x, int code ATTRIBUTE_UNUSED) gcc_assert (!x || !REG_P (x) || REGNO (x) < FIRST_PSEUDO_REGISTER); PRINT_OPERAND (asm_out_file, x, code); + if (x && MEM_P (x) && GET_CODE (XEXP (x, 0)) == SYMBOL_REF) + { + tree t; + x = XEXP (x, 0); + t = SYMBOL_REF_DECL (x); + if (t) + assemble_external (t); + } } /* Print a memory reference operand for address X -- 2.30.2