4.7 rejects this without an ICE, the ICE is seen on 4.8, 4.9 branches and trunk. $ cat tst.cc #include <array> const int i = 0; std::array<int, 1> bar = { [i] = 0 }; $ g++-4.7 -Wall -std=gnu++0x tst.cc tst.cc:5:3: error: 'std::array<int, 1ul>' has no non-static data member named 'i' $ g++-4.8 -Wall -std=gnu++0x tst.cc tst.cc:5:3: internal compiler error: in lookup_field_1, at cp/search.c:384 }; ^ Please submit a full bug report, with preprocessed source if appropriate.
GCC 4.8.3 is being released, adjusting target milestone.
Author: jason Date: Tue Jun 3 04:57:39 2014 New Revision: 211160 URL: http://gcc.gnu.org/viewcvs?rev=211160&root=gcc&view=rev Log: PR c++/61046 * decl.c (reshape_init_class): Handle un-folded constant-expressions. Added: trunk/gcc/testsuite/g++.dg/ext/desig7.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl.c
Fixed on trunk.