On 9/5/18 5:48 AM, a...@codesourcery.com wrote: > > The HSA GPU drivers can't cope with binaries that have the same symbol defined > multiple times, even though the names are not exported. This happens whenever > there are file-scope static variables with matching names. I believe it's > also > an issue with switch tables. > > This is a bug, but outside our control, so we must work around it when > multiple > translation units have the same symbol defined. > > Therefore, we've implemented name mangling via > TARGET_MANGLE_DECL_ASSEMBLER_NAME, but found some places where the middle-end > assumes that the decl name matches the name in the source. > > This patch fixes up those cases by falling back to comparing the unmangled > name, when a lookup fails. > > 2018-09-05 Julian Brown <jul...@codesourcery.com> > > gcc/ > * cgraphunit.c (handle_alias_pairs): Scan for aliases by DECL_NAME if > decl assembler name doesn't match. > > gcc/c-family/ > * c-pragma.c (maye_apply_pending_pragma_weaks): Scan for aliases with > DECL_NAME if decl assembler name doesn't match. This should be fine. But please verify there's no regressions on the x86_64 linux target, particularly for the multi-versioning tests (mv*.c mv*.C
Jeff