PR c++/71504 * constexpr.c (cxx_fold_indirect_ref_1): New function. (cxx_fold_indirect_ref): Use it. * g++.dg/cpp0x/constexpr-array21.C: New test. * g++.dg/cpp1y/constexpr-array7.C: New test. * g++.dg/cpp1z/constexpr-array1.C: New test. 2019-10-04 Jason Merrill <jason@redhat.com> PR c++/71504 * g++.dg/cpp0x/constexpr-array20.C: New test. From-SVN: r276563
16 lines
217 B
C
16 lines
217 B
C
// PR c++/71504
|
|
// { dg-do compile { target c++11 } }
|
|
|
|
enum E { e };
|
|
|
|
constexpr bool arr[1][1] = {{true}};
|
|
|
|
template<E x, E y>
|
|
void check() {
|
|
static_assert(arr[x][y], "");
|
|
}
|
|
|
|
int main() {
|
|
check<e, e>();
|
|
}
|