c++: Add fixed test [PR71424]
authorMarek Polacek <polacek@redhat.com>
Fri, 29 Apr 2022 13:33:08 +0000 (09:33 -0400)
committerMarek Polacek <polacek@redhat.com>
Fri, 29 Apr 2022 13:33:31 +0000 (09:33 -0400)
This was fixed by r12-6329-g4f6bc28fc7dd86.

PR c++/71424

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist-array15.C: New test.

gcc/testsuite/g++.dg/cpp0x/initlist-array15.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-array15.C b/gcc/testsuite/g++.dg/cpp0x/initlist-array15.C
new file mode 100644 (file)
index 0000000..67e30d8
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/71424
+// { dg-do compile { target c++11 } }
+
+#include <initializer_list>
+
+void f(std::initializer_list<double[2]> list)
+{
+}
+
+int main()
+{
+   f({ { 1.0, 2.0 }, { 3.0, 4.0 } });
+}