This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/32561] New: [4.3 regression] ICE with duplicate template parameter


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]