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: Fri, 11 Jun 2010 09:37:16 +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> <m3mxv3f3jf.fsf@redhat.com> <87ocfizkt6.fsf@firetop.home>
Richard Sandiford <rdsandiford@googlemail.com> writes:
> For future reference, mipsisa64-elf is cross only. You can't bootstrap
> GCC on it. Building a cross compiler is exactly the right thing to
> do.
Ah, okay, I didn't know. Thanks.
>
> I'm surprised that it took a long time though. "make all-gcc" (to get
> cc1plus) ought to complete very quickly, especially by normal bootstrap
> standards. ;-) You also don't need access to an assembler or linker if
> you're just doing "make all-gcc".
Well, I wanted to at least go as far as building libstdc++, but I had
errors I couldn't undertanda and gave up eventually. I agree building
cc1plus was quick :) Out of curiousity, Do you have a reference of how
to build the cross for mipsisa64-elf?
>> If you can do a quick test, does the (untested) patch below fix the
>> issue for you?
>
> It certainly does. Thanks a lot for the quick fix.
No problem. I bootstrapped and regtested the full compiler with the patch
below on x86_64-unknown-linux-gnu against trunk and did a shallow test
of it on mipsisa64-elf.
As Jason OK'ed the patch in another subthread, I am going to apply this
to trunk shortly.
Thanks.
commit 4bd63480903620092f5bbfe563569d90ef05b747
Author: Dodji Seketeli <dodji@redhat.com>
Date: Thu Jun 10 19:24:49 2010 +0200
Fix MIPS bootstrap
gcc/ChangeLog:
Fix bootstap on mips
* dwarf2out.c (is_naming_typedef_dec): Built-in TYPE_DECLs cannot
be naming typedefs.
gcc/testsuite/ChangeLog:
Fix MIPS bootstrap
* g++.dg/other/typedef4.C: New test.
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
diff --git a/gcc/testsuite/g++.dg/other/typedef4.C b/gcc/testsuite/g++.dg/other/typedef4.C
new file mode 100644
index 0000000..b752f2c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/typedef4.C
@@ -0,0 +1,7 @@
+// { dg-options "-g" }
+// { dg-do compile }
+
+// On some platforms like MIPS, __builtin_va_list is a
+// RECORD_TYPE. Make sure we don't wrongly try to generate debug info
+// for its TYPE_DECL and crash.
+typedef __builtin_va_list foo;
--
Dodji