From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11248 invoked by alias); 13 Jul 2003 16:24:42 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11240 invoked by uid 48); 13 Jul 2003 16:24:41 -0000 Date: Sun, 13 Jul 2003 16:24:00 -0000 From: "drtr at dial dot pipex dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20030713162440.11513.drtr@dial.pipex.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/11513] New: ICE in push_template_decl_real cp/pt.c:2755, template member functions X-Bugzilla-Reason: CC X-SW-Source: 2003-07/txt/msg01491.txt.bz2 List-Id: 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 struct bar // template_class_depth(bar) = 1 { struct foo { int a; }; template int wom(U c) { struct foo b; // processing_template_decl = 2 }; };