This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32561] New: [4.3 regression] ICE with duplicate template parameter
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jun 2007 12:59:12 -0000
- Subject: [Bug c++/32561] New: [4.3 regression] ICE with duplicate template parameter
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers an ICE on mainline:
=============================================
template<int N, int N> struct A;
=============================================
bug.cc:1: internal compiler error: tree check: expected var_decl, have
const_decl in redeclaration_error_message, at cp/decl.c:2198
Please submit a full bug report, [etc.]
The regression was introduced between 2007-06-07 and 2007-06-16,
probably by the patch
2007-06-15 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_VAR_MARKED_P): Remove.
(DECL_ANON_UNION_VAR_P): New macro.
* class.c (fixed_type_or_null): Tidy. Use a hash table, rather
than DECL_VAR_MARKED_P, to keep track of which variables we have
seen.
* decl.c (redeclaration_error_message): Complain about redeclaring
anonymous union members at namespace scope.
* decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
--
Summary: [4.3 regression] ICE with duplicate template parameter
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32561