Commit bef89e9e by Kriang Lerdsuwanakij Committed by Kriang Lerdsuwanakij

re PR c++/10793 (ICE (treecheck) when partial-specializing with an invalid type…

re PR c++/10793 (ICE (treecheck) when partial-specializing with an invalid type and a base class, in xref_basetypes, at cp/decl.c:12834)

	PR c++/10793
	* decl.c (xref_basetypes): Handle error_mark_node.

	* g++.dg/template/crash9.C: New test.

From-SVN: r69671
parent 4bd56354
2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10793
* decl.c (xref_basetypes): Handle error_mark_node.
2003-07-22 Nathan Sidwell <nathan@codesourcery.com> 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (enum cp_lvalue_kind): Add clk_packed. * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
......
...@@ -12831,6 +12831,9 @@ xref_basetypes (tree ref, tree base_list) ...@@ -12831,6 +12831,9 @@ xref_basetypes (tree ref, tree base_list)
int i; int i;
enum tag_types tag_code; enum tag_types tag_code;
if (ref == error_mark_node)
return;
if (TREE_CODE (ref) == UNION_TYPE) if (TREE_CODE (ref) == UNION_TYPE)
{ {
error ("derived union `%T' invalid", ref); error ("derived union `%T' invalid", ref);
......
2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10793
* g++.dg/template/crash9.C: New test.
2003-07-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2003-07-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/3004 PR c++/3004
......
// { dg-do compile }
// Origin: Volker Reichelt <reichelt@gcc.gnu.org>
// PR c++/10793: ICE in handling base class when the current class
// contains error.
template <typename> struct A {};
template <typename> struct A<INVALID> : A<int> { }; // { dg-error "not declared|invalid" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment