* [pushed] c++: Add testcase for already fixed PR [PR109506]
@ 2023-05-02 12:50 Patrick Palka
0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2023-05-02 12:50 UTC (permalink / raw)
To: gcc-patches; +Cc: jason, Patrick Palka
The PR109666 fix r14-386-g07c52d1eec967 incidentally also fixes this PR.
PR c++/109506
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/nsdmi-template26.C: New test.
---
gcc/testsuite/g++.dg/cpp0x/nsdmi-template26.C | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 gcc/testsuite/g++.dg/cpp0x/nsdmi-template26.C
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template26.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template26.C
new file mode 100644
index 00000000000..032b7b61619
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template26.C
@@ -0,0 +1,22 @@
+// PR c++/109506
+// { dg-do link { target c++11 } }
+// { dg-additional-options "-fchecking=2" }
+
+template<class T>
+struct foo {
+ foo() { };
+};
+
+template<class T>
+class bar {
+ foo<int> alloc_{};
+};
+
+template<class T>
+bar<int> func1() {
+ return bar<int>{};
+}
+
+int main() {
+ func1<int>();
+}
--
2.40.1.459.g48d89b51b3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-02 12:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 12:50 [pushed] c++: Add testcase for already fixed PR [PR109506] Patrick Palka
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).