[Bug c++/11513] New: ICE in push_template_decl_real cp/pt.c:2755, template member functions
drtr at dial dot pipex dot com
gcc-bugzilla@gcc.gnu.org
Sun Jul 13 16:24:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11513
Summary: ICE in push_template_decl_real cp/pt.c:2755, template
member functions
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: drtr at dial dot pipex dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
When parsing a member template function of a template, the compiler
crashes on variable definitions of the form 'struct foo b;'.
I think the problem is in the PROCESSING_REAL_TEMPLATE_DECL_P() macro
which gives the wrong result when within member template functions.
See the example below; when parsing struct foo b; the compiler crashes.
This may be caused by the use of PROCESSING_REAL_TEMPLATE_DECL_P() returning
1 in xref_tag() at cp/decl.c: 13297.
template <typename T>
struct bar // template_class_depth(bar<T>) = 1
{
struct foo
{
int a;
};
template <typename U>
int wom(U c)
{
struct foo b; // processing_template_decl = 2
};
};
More information about the Gcc-bugs
mailing list