public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] c++: Add fixed test [PR89197]
@ 2022-06-27 18:57 Marek Polacek
  0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2022-06-27 18:57 UTC (permalink / raw)
  To: GCC Patches

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

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

base-commit: 5f6b6494035fb984d745efa28d334f7893e7272b
-- 
2.36.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-27 18:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27 18:57 [pushed] c++: Add fixed test [PR89197] Marek Polacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).