This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR48703: segfault in mangler due to -g
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Apr 2011 11:01:58 +0200
- Subject: Re: Fix PR48703: segfault in mangler due to -g
- References: <Pine.LNX.4.64.1104202353250.1989@wotan.suse.de>
On Thu, Apr 21, 2011 at 12:04 AM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> I wrote:
>
>> Basically we have to set assembler names early also for TYPE_DECLs, we
>> can't rely on the frontends langhook to do that after free_lang_data.
>>
>> Okay for trunk assuming regstrapping on x86_64-linux works?
>
> Patch retracted, doesn't even survive testsuite. ?The problem is that we
> can't simply accept TYPE_DECLs for generating assembler names, because the
> other frontends except C++ can't deal with that (they use the default
> set_decl_assembler_name hook). ?Even conditionalizing on
> ?lang_hooks.set_decl_assembler_name == lhd_set_decl_assembler_name
> doesn't work, because mysteriously for C++ we'll get ICEs in the C++
> frontend itself when presented to mangle some TYPE_DECLs (namely when
> flag_abi_version is set, mangle_decl unconditionally calls make_alias_for,
> which in turn doesn't work with type_decls).
>
> It's all quite messy and a wonder why -g worked somewhat with -flto at all
> for so long :-(
It's indeed messy ;)
An alternate fix would be to have a gimple_decl_assembler_name, and
reset the langhook to that variant. I'm testing a patch according to that.
Richard.
>
> Ciao,
> Michael.
>