[PATCH] Fix PR42531: lto generates invalid assembler ".section" directives.
Dave Korn
dave.korn.cygwin@googlemail.com
Thu Dec 31 18:01:00 GMT 2009
Richard Guenther wrote:
> On Thu, Dec 31, 2009 at 6:15 PM, Dave Korn
>> H.J. Lu wrote:
>>
>>> The patch doesn't look right:
>>> const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (function));
>>> + if (name[0] == '*')
>>> + name++;
>>> + section_name =
>>> + lto_get_section_name (LTO_section_function_body, name);
>>> It doesn't handle name == NULL.
>> Is it possible that the assembler name could not be set at this point?
>> What happens if we call copy_function for two different functions that
>> both don't have any assembler name?
> They always have an assembler name.
That was very much what I hoped :) I'll put a gcc_assert in, just for neatness.
cheers,
DaveK
More information about the Gcc-patches
mailing list