------- Comment #30 from jakub at gcc dot gnu dot org 2007-12-13 18:58 ------- If PA wants to keep the guards (!TREE_ASM_WRITTEN && SYMBOL_REF_REFERENCED_P ()), it can, but that surely can be done in ASM_OUTPUT_EXTERNAL too, doesn't need any deferral. In that case this will be broken again. From what I see this is caused by http://gcc.gnu.org/ml/gcc-patches/2005-06/msg02029.html which removed copying of DECL_RTL from olddecl to newdecl (but kept the DECL_RTL_SET_P hunk at the end, which now never triggers). Because of that change DECL_RTL after duplicate_decls is now created from scratch and so the PA specific bit whether it was referenced or not is not set. I guess we should fix merge_decls no matter what PA chooses.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34003