Fix PR middle-end/46674

Richard Guenther richard.guenther@gmail.com
Wed Dec 1 11:50:00 GMT 2010


On Wed, Dec 1, 2010 at 12:57 AM, Jie Zhang <jie@codesourcery.com> wrote:
> PR 46674 is same as PR 46221 indeed. It happens when one alias has a user
> set name.
>
> extern void jelly (void) __asm__ ("jelly2") __attribute__ ((alias
> ("dessert"), weak));
> extern void wobbly (void) __attribute__ ((alias ("jelly2"), weak));
>
> When jelly was added to the visible point set, the identifier was "*jelly2".
> But later GCC looked for identifier "jelly2" when deciding if alias wobbly
> could be removed or not. Since "jelly2" was not in the visible point set,
> alias wobbly would be removed.
>
> With this patch, the identifier added to the visible point set has the
> prefix '*' stripped if there is one.
>
> Bootstrapped and regression tested on x86_64-linux-gnu with c,c++,lto.
>
> OK?

Hm.  If a target prefixes an underscore does the alias attribute argument
need to include that underscore?  I'm somewhat worried about
consistency on those weird targets, but the patch is clearly a
progression.

It would be really nice if DECL_ASSEMBLER_NAME would already
contain all target mangling from the start (also for LTO which has
similar problems when doing symbol name merging).

Thus, ok.

Thanks,
Richard.

> Regards,
> --
> Jie Zhang
>
>
>



More information about the Gcc-patches mailing list