From: Paolo Carlini Date: Tue, 8 Oct 2013 21:54:06 +0000 (+0000) Subject: re PR c++/58665 (ICE with using incomplete struct) X-Git-Tag: releases/gcc-4.9.0~3679 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a330ff7f5c68964b62c691649560ae2f19430a8f;p=thirdparty%2Fgcc.git re PR c++/58665 (ICE with using incomplete struct) /cp 2013-10-08 Paolo Carlini PR c++/58665 Revert: 2013-10-04 Paolo Carlini PR c++/58448 * pt.c (tsubst): Use error_operand_p on parameter t. /testsuite 2013-10-08 Paolo Carlini PR c++/58665 Revert: 2013-10-04 Paolo Carlini PR c++/58448 * g++.dg/template/crash117.C: New. From-SVN: r203288 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fc2ec31c551f..3e68712c2a4a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2013-10-08 Paolo Carlini + + PR c++/58665 + Revert: + 2013-10-04 Paolo Carlini + + PR c++/58448 + * pt.c (tsubst): Use error_operand_p on parameter t. + 2013-10-06 Paolo Carlini PR c++/58126 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 2828cc983b37..a35000728aa2 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -11272,7 +11272,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) enum tree_code code; tree type, r = NULL_TREE; - if (t == NULL_TREE + if (t == NULL_TREE || t == error_mark_node || t == integer_type_node || t == void_type_node || t == char_type_node @@ -11281,9 +11281,6 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) || TREE_CODE (t) == TRANSLATION_UNIT_DECL) return t; - if (error_operand_p (t)) - return error_mark_node; - if (DECL_P (t)) return tsubst_decl (t, args, complain); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 68aac9c566e0..a45b913080a1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2013-10-08 Paolo Carlini + + PR c++/58665 + Revert: + 2013-10-04 Paolo Carlini + + PR c++/58448 + * g++.dg/template/crash117.C: New. + 2013-10-08 Andreas Krebbel * gcc.target/s390/htm-nofloat-2.c: Add -mzarch to asm options. diff --git a/gcc/testsuite/g++.dg/template/crash117.C b/gcc/testsuite/g++.dg/template/crash117.C deleted file mode 100644 index 813140edc6ff..000000000000 --- a/gcc/testsuite/g++.dg/template/crash117.C +++ /dev/null @@ -1,6 +0,0 @@ -// PR c++/58448 - -class SmallVector; struct Types4; -template struct Types { - typedef Types4<>::Constructable // { dg-error "template|typedef|expected" } -} Types:: > // { dg-error "expected" }