aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJames A. Morrison <phython@gcc.gnu.org>2005-08-11 04:21:55 +0000
committerJames A. Morrison <phython@gcc.gnu.org>2005-08-11 04:21:55 +0000
commita4faac50ad558b6e7cfb3f90f2e510363915bdc1 (patch)
tree0bb67d99373199da0897f68eda349fdc0ffa9673 /gcc/tree.c
parent907f033f983dec0caa1d17d13557ef5c61e407e3 (diff)
downloadgcc-a4faac50ad558b6e7cfb3f90f2e510363915bdc1.zip
gcc-a4faac50ad558b6e7cfb3f90f2e510363915bdc1.tar.gz
gcc-a4faac50ad558b6e7cfb3f90f2e510363915bdc1.tar.bz2
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
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 39e2f1f..849482d3 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -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