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: unassig...@gcc.gnu.org
        ReportedBy: reich...@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.]

Reply via email to