[pushed] c++: Add fixed test [PR89197]

Message ID 20220627185704.118861-1-polacek@redhat.com
State Committed
Commit 508231d54405ac9f120cf30c28cd6eb10ceded30
Headers
Series [pushed] c++: Add fixed test [PR89197] |

Commit Message

Marek Polacek June 27, 2022, 6:57 p.m. UTC
  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 | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp0x/initlist130.C


base-commit: 5f6b6494035fb984d745efa28d334f7893e7272b
  

Patch

diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist130.C b/gcc/testsuite/g++.dg/cpp0x/initlist130.C
new file mode 100644
index 00000000000..662a5a3ce3f
--- /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}; }