This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix PR c++/23225
- From: ja2morri at csclub dot uwaterloo dot ca (James A. Morrison)
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 06 Aug 2005 01:40:44 -0400
- Subject: [patch] Fix PR c++/23225
Hi,
This patch fixes PR23225 by returning error_mark_node for
build_pointer_type_for_mode when error_mark_node is passed. This patch has
been bootstrapped and regtested on ia64-linux with no new regressions. Ok
for mainline?
:ADDPATCH C++:
--
Thanks,
Jim
http://www.csclub.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim
2005-08-05 James A. Morrison <phython@gcc.gnu.org>
PR c++/23225
* tree.c (build_pointer_type_for_mode): Robustify.
Index: tree.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/tree.c,v
retrieving revision 1.498
diff -u -p -r1.498 tree.c
--- tree.c 28 Jul 2005 16:30:00 -0000 1.498
+++ tree.c 4 Aug 2005 14:48:11 -0000
@@ -4684,6 +4684,9 @@ build_pointer_type_for_mode (tree to_typ
{
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
// 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 } */