From 79bba51c2833a33d574533bf16ea63d97d201736 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Sat, 22 May 2004 18:18:46 +0000 Subject: [PATCH] re PR bootstrap/15546 (Bootstrap stage3: Undefined references to basic_string) 2004-05-22 Andrew Pinski PR 15546 * config/i386/i386.c (output_pic_addr_const ): Call mark_decl_referenced on the SYMBOL_REF_DECL. From-SVN: r82141 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2acb431be3d..eebf878f00f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-05-22 Andrew Pinski + + PR 15546 + * config/i386/i386.c (output_pic_addr_const ): + Call mark_decl_referenced on the SYMBOL_REF_DECL. + 2004-05-22 Andrew Pinski * c-common.c (c_common_truthvalue_conversion): Handle diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index ad0407d7623..b1d7be3467f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -6762,6 +6762,10 @@ output_pic_addr_const (FILE *file, rtx x, int code) break; case SYMBOL_REF: + /* Mark the decl as referenced so that cgraph will output the function. */ + if (SYMBOL_REF_DECL (x)) + mark_decl_referenced (SYMBOL_REF_DECL (x)); + assemble_name (file, XSTR (x, 0)); if (!TARGET_MACHO && code == 'P' && ! SYMBOL_REF_LOCAL_P (x)) fputs ("@PLT", file); -- 2.30.2