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++/51430] New: [4.7 Regression] ICE with array as static const member


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51430

             Bug #: 51430
           Summary: [4.7 Regression] ICE with array as static const member
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: reichelt@gcc.gnu.org


The following invalid code snippet triggers an ICE on trunk:

==================================
template<int> struct A
{
  static const int x[] = 0;
};

A<0> a;
==================================

bug.cc:3:26: error: invalid in-class initialization of static data member of
non-integral type 'const int []'
bug.cc:3:26: error: initializer fails to determine size of 'A<<anonymous> >::x'
bug.cc: In instantiation of 'struct A<0>':
bug.cc:6:26:   required from here
bug.cc:3:26: internal compiler error: in strip_array_domain, at cp/typeck.c:890
Please submit a full bug report, [etc.]


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