Fix PR middle-end/46674

Jie Zhang jie@codesourcery.com
Thu Dec 2 04:15:00 GMT 2010


On 12/01/2010 07:50 PM, Richard Guenther wrote:
> 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).
>
Yeah. At least it's not a good to use a prefix '*' to mark its name is 
set by user. I think it will be better to use a tree field to record 
this but keep the symbol name unchanged.

> Thus, ok.
>
Thanks. Committed on trunk.


-- 
Jie Zhang



More information about the Gcc-patches mailing list