From: Andrew Pinski Date: Sun, 3 Oct 2004 18:07:56 +0000 (+0000) Subject: re PR c++/17797 (ICE in build_reinterpret_cast) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8c2c4923382e694c41acd86f22d01221eaa4fa1;p=gcc.git re PR c++/17797 (ICE in build_reinterpret_cast) 2004-10-03 Andrew Pinski PR c++/17797 * typeck.c (build_reinterpret_cast): Return if the inner type is error_mark_node. From-SVN: r88457 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d22d49dd15a..d93e152ab9c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2004-10-03 Andrew Pinski + + PR c++/17797 + * typeck.c (build_reinterpret_cast): Return if the inner type + is error_mark_node. + 2004-10-01 Jan Hubicka * semantics.c (expand_body): Update call of tree_rest_of_compilation. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 85337735f07..8b9bdd3c523 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -4711,6 +4711,9 @@ build_reinterpret_cast (tree type, tree expr) intype = TREE_TYPE (expr); + if (intype == error_mark_node) + return error_mark_node; + if (TREE_CODE (type) == REFERENCE_TYPE) { if (! real_lvalue_p (expr))