http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36282
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 32345 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32345&action=edit gcc49-pr36282.patch Untested fix. If this turns out to be too expensive (though, I think #pragma weak is rare and the patch should at most double the time to compute DECL_ASSEMBLER_NAME), perhaps we could use some spare bit in decl_with_vis to mean DECL_ASSEMBLER_NAME_SET_P (in addition to the current two tests). Then we could keep the computed assembler name cached and still pretend the name has not been set, decl_assembler_name would set that bit. We'd need to handle with care the cases when the bit is unset and say we rename the symbol though, then of course we'd need to first SET_DECL_ASSEMBLER_NAME to NULL.