Commit f60a10e7 by Kriang Lerdsuwanakij Committed by Kriang Lerdsuwanakij

re PR c++/11513 (ICE in push_template_decl_real cp/pt.c:2755, template member functions)

	PR c++/11513
	* cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.

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

From-SVN: r69739
parent 5aaaf0e8
2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11513
* cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2003-07-23 Mark Mitchell <mark@codesourcery.com> 2003-07-23 Mark Mitchell <mark@codesourcery.com>
PR c++/11645 PR c++/11645
......
...@@ -2838,7 +2838,7 @@ struct lang_decl GTY(()) ...@@ -2838,7 +2838,7 @@ struct lang_decl GTY(())
entity with its own template parameter list, and which is not a entity with its own template parameter list, and which is not a
full specialization. */ full specialization. */
#define PROCESSING_REAL_TEMPLATE_DECL_P() \ #define PROCESSING_REAL_TEMPLATE_DECL_P() \
(processing_template_decl > template_class_depth (current_class_type)) (processing_template_decl > template_class_depth (current_scope ()))
/* Nonzero if this VAR_DECL or FUNCTION_DECL has already been /* Nonzero if this VAR_DECL or FUNCTION_DECL has already been
instantiated, i.e. its definition has been generated from the instantiated, i.e. its definition has been generated from the
......
2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11513
* g++.dg/template/crash8.C: New test.
2003-07-23 Steven Bosscher <steven@gcc.gnu.org> 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
PR c/10602 PR c/10602
......
// { dg-do compile }
// Origin: David Robinson <drtr@dial.pipex.com>
// PR c++/11513: ICE due to incorrect decision whether the tag is template.
template <typename T>
struct bar
{
struct foo
{
int a;
};
template <typename U>
int wom(U c)
{
struct foo b;
}
};
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