diff mbox

[RFC] PR c++/44188

Message ID m3pqzyc95f.fsf@redhat.com
State New
Headers show

Commit Message

Dodji Seketeli June 11, 2010, 7:37 a.m. UTC
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.


commit 4bd63480903620092f5bbfe563569d90ef05b747
Author: Dodji Seketeli <dodji@redhat.com>
Date:   Thu Jun 10 19:24:49 2010 +0200

    Fix MIPS bootstrap
    	Fix bootstap on mips
    	* dwarf2out.c (is_naming_typedef_dec): Built-in TYPE_DECLs cannot
    	be naming typedefs.
    	Fix MIPS bootstrap
    	* g++.dg/other/typedef4.C: New test.
diff mbox


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;