c++: Add fixed test [PR89197]
authorMarek Polacek <polacek@redhat.com>
Mon, 27 Jun 2022 18:52:58 +0000 (14:52 -0400)
committerMarek Polacek <polacek@redhat.com>
Mon, 27 Jun 2022 18:55:53 +0000 (14:55 -0400)
Fixed since bug 97899 was fixed.

PR c++/89197

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist130.C: New test.

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

diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist130.C b/gcc/testsuite/g++.dg/cpp0x/initlist130.C
new file mode 100644 (file)
index 0000000..662a5a3
--- /dev/null
@@ -0,0 +1,5 @@
+// PR c++/89197
+// { dg-options "-Wno-c++11-extensions" }
+// This used to ICE with std=c++03, therefore we run it in C++03 too.
+
+template <int> void foo(int i) { const int c = int{i}; }