8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/constexpr-array20.C
Jakub Jelinek 0fe2ae2902 re PR c++/71504 ([C++11] constexpr fails with multidimensional arrays)
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
2019-10-04 08:56:02 +02:00

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>();
}