aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2022-06-27 14:52:58 -0400
committerMarek Polacek <polacek@redhat.com>2022-06-27 14:55:53 -0400
commit508231d54405ac9f120cf30c28cd6eb10ceded30 (patch)
treef17569b5ab366581090724b11354230abca3984d /gcc
parent5f6b6494035fb984d745efa28d334f7893e7272b (diff)
downloadgcc-508231d54405ac9f120cf30c28cd6eb10ceded30.zip
gcc-508231d54405ac9f120cf30c28cd6eb10ceded30.tar.gz
gcc-508231d54405ac9f120cf30c28cd6eb10ceded30.tar.bz2
c++: Add fixed test [PR89197]
Fixed since bug 97899 was fixed. PR c++/89197 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist130.C: New test.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist130.C5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist130.C b/gcc/testsuite/g++.dg/cpp0x/initlist130.C
new file mode 100644
index 0000000..662a5a3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist130.C
@@ -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}; }