re PR c++/23225 (tree check: expected class type, have exceptional (error_mark) in build_pointer_type_for_mode, at tree.c:4246)

2005-08-10  James A. Morrison  <phython@gcc.gnu.org>

        PR c++/23225
        * tree.c (build_pointer_type_for_mode): Robustify.

From-SVN: r102977
This commit is contained in:
James A. Morrison 2005-08-11 04:21:55 +00:00
parent 907f033f98
commit a4faac50ad
4 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-08-10 James A. Morrison <phython@gcc.gnu.org>
PR c++/23225
* tree.c (build_pointer_type_for_mode): Robustify.
2005-08-10 James E Wilson <wilson@specifix.com>
* defaults.h, config/alpha/alpha.h, config/ia64/ia64.h

View File

@ -1,7 +1,12 @@
2005-08-10 James A. Morrison <phython@gcc.gnu.org>
PR c++/23225
* g++.dg/testsuite/parse/crash27.C: new test.
2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/22143
gfortran.dg/shift-kind.f90: New testcase.
* gfortran.dg/shift-kind.f90: New testcase.
2005-08-10 Richard Sandiford <richard@codesourcery.com>

View File

@ -0,0 +1,9 @@
// Bug: 23225
void Dispatcher()
(__builtin_offsetof (ArgsType, largeMsgLen))
/* { dg-error "function " "function" { target *-*-* } 4 } */
/* { dg-error "expected type" "expected 1" { target *-*-* } 4 } */
/* { dg-error "expected `,' before" "expected 2" { target *-*-* } 4 } */
/* { dg-error "expected `\\\)" "expected 3" { target *-*-* } 4 } */
/* { dg-error "expected ',' or" "expected 4" { target *-*-* } 4 } */

View File

@ -4684,6 +4684,9 @@ build_pointer_type_for_mode (tree to_type, enum machine_mode mode,
{
tree t;
if (to_type == error_mark_node)
return error_mark_node;
/* In some cases, languages will have things that aren't a POINTER_TYPE
(such as a RECORD_TYPE for fat pointers in Ada) as TYPE_POINTER_TO.
In that case, return that type without regard to the rest of our