mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-25 07:34:00 +08:00
re PR c++/10108 (tree checking ICE: expected var_decl, have error_mark in tsubst_decl)
PR c++/10108 * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for error_mark_node. * g++.dg/template/crash7.C: New test. From-SVN: r69409
This commit is contained in:
parent
aadf50ed06
commit
caec1dc059
@ -1,3 +1,9 @@
|
|||||||
|
2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||||
|
|
||||||
|
PR c++/10108
|
||||||
|
* pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
|
||||||
|
error_mark_node.
|
||||||
|
|
||||||
2003-07-14 Mark Mitchell <mark@codesourcery.com>
|
2003-07-14 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
PR c++/11509
|
PR c++/11509
|
||||||
|
@ -5837,6 +5837,8 @@ tsubst_decl (tree t, tree args, tree type, tsubst_flags_t complain)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
tree new_decl = tsubst (decl, args, complain, in_decl);
|
tree new_decl = tsubst (decl, args, complain, in_decl);
|
||||||
|
if (new_decl == error_mark_node)
|
||||||
|
return error_mark_node;
|
||||||
|
|
||||||
DECL_TEMPLATE_RESULT (r) = new_decl;
|
DECL_TEMPLATE_RESULT (r) = new_decl;
|
||||||
DECL_TI_TEMPLATE (new_decl) = r;
|
DECL_TI_TEMPLATE (new_decl) = r;
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||||
|
|
||||||
|
PR c++/10108
|
||||||
|
* g++.dg/template/crash7.C: New test.
|
||||||
|
|
||||||
2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
|
2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
|
||||||
|
|
||||||
PR target/10795
|
PR target/10795
|
||||||
|
13
gcc/testsuite/g++.dg/template/crash7.C
Normal file
13
gcc/testsuite/g++.dg/template/crash7.C
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// { dg-do compile }
|
||||||
|
|
||||||
|
// Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||||
|
|
||||||
|
// PR c++/10108: ICE in tsubst_decl for error due to non-existence
|
||||||
|
// nested type.
|
||||||
|
|
||||||
|
template <typename> struct A
|
||||||
|
{ // { dg-error "candidates" }
|
||||||
|
template <typename> A(typename A::X) {} // { dg-error "no type" }
|
||||||
|
};
|
||||||
|
|
||||||
|
A<void> a; // { dg-error "instantiated|no match" }
|
Loading…
Reference in New Issue
Block a user