From: dodji Date: Fri, 11 Jun 2010 08:19:21 +0000 (+0000) Subject: Fix MIPS bootstrap X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd33509357a897aa5fe3ef2fb6be984ad57df418;p=thirdparty%2Fgcc.git 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160599 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f9de31d9959..42492a437852 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-06-10 Dodji Seketeli + + Fix bootstap on mips + * dwarf2out.c (is_naming_typedef_dec): Built-in TYPE_DECLs cannot + be naming typedefs. + 2010-06-11 Kai Tietz * system.h (helper_const_non_const_cast): New inline for diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6cbe8dc092c1..e35a780fe489 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/ChangeLog b/gcc/testsuite/ChangeLog index b2ffe20bc55b..e7eae084491c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-06-10 Dodji Seketeli + + Fix MIPS bootstrap + * g++.dg/other/typedef4.C: New test. + 2010-06-10 Janus Weil PR fortran/44207 diff --git a/gcc/testsuite/g++.dg/other/typedef4.C b/gcc/testsuite/g++.dg/other/typedef4.C new file mode 100644 index 000000000000..b752f2cae7a3 --- /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;