aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2023-05-02 08:48:59 -0400
committerPatrick Palka <ppalka@redhat.com>2023-05-02 08:48:59 -0400
commit9a9840cedbdc8be8252fd8f2d31d8fbd36632a2e (patch)
tree8e58ac3bc6ccb4a7b0a68f1e06318b0e65ce6086
parentcbe32d388c0c265030d45bc55ed4bcd7e20ad365 (diff)
downloadgcc-9a9840cedbdc8be8252fd8f2d31d8fbd36632a2e.zip
gcc-9a9840cedbdc8be8252fd8f2d31d8fbd36632a2e.tar.gz
gcc-9a9840cedbdc8be8252fd8f2d31d8fbd36632a2e.tar.bz2
c++: Add testcase for already fixed PR [PR109506]
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.
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template26.C22
1 files changed, 22 insertions, 0 deletions
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 0000000..032b7b6
--- /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>();
+}