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.
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.