This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] PR c++/44188
- From: Dodji Seketeli <dodji at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, rdsandiford at googlemail dot com
- Date: Thu, 10 Jun 2010 14:57:56 +0200
- Subject: Re: [RFC] PR c++/44188
- References: <20100520110538.GR29186@redhat.com> <4BF575DA.8030108@redhat.com> <20100521121623.GU29186@redhat.com> <4BF6A896.3060703@redhat.com> <m3bpc4t9i8.fsf@redhat.com> <4BFBED4E.6030306@redhat.com> <m3wrurirj0.fsf@redhat.com> <4BFC92CD.9030702@redhat.com> <m3mxvmhmij.fsf@redhat.com> <4BFD3CFA.8080908@redhat.com> <m3r5kyczxp.fsf@redhat.com> <4BFD6192.2020807@redhat.com> <m3pr05xncw.fsf@redhat.com> <871vcg2f6w.fsf@firetop.home>
Richard Sandiford <rdsandiford@googlemail.com> writes:
> This breaks builds of libstdc++-v3 on mipsisa64-elf, where
> __builtin_va_list is a record type. We end up trying to output a
> location for the definition of __builtin_va_list, which has location
> UNKNOWN_LOCATION. We then segfault in lookup_filename because the
> filename associated with UNKNOWN_LOCATION is null.
>
> Testcase is:
>
> typedef __builtin_va_list foo;
>
> compiled with "./cc1plus -g".
>
> A simple "fix" is attached, but many other built-in decls use
> UNKNOWN_LOCATION, so I suspect something more fundamental is wrong.
> Could you have a look?
Sure. I am building a cross compiler right now, as I don't have access
to this arch otherwise. It's taking time though.
If you can do a quick test, does the (untested) patch below fix the
issue for you?
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 6cbe8dc..e35a780 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -19891,6 +19891,7 @@ is_naming_typedef_decl (const_tree decl)
if (decl == NULL_TREE
|| TREE_CODE (decl) != TYPE_DECL
|| !is_tagged_type (TREE_TYPE (decl))
+ || DECL_IS_BUILTIN (decl)
|| is_redundant_typedef (decl)
/* It looks like Ada produces TYPE_DECLs that are very similar
to C++ naming typedefs but that have different
Thanks.
--
Dodji