aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2021-03-03 15:10:21 -0500
committerMarek Polacek <polacek@redhat.com>2021-03-03 15:12:07 -0500
commit49df367b17995c54fabe5bca290eede7dfab05b3 (patch)
treea6e3a1040613669cb7f04035152214a16f2ca729
parent499193a692efa33c9b2fe3ad8da0f4d5e5fd0e0c (diff)
downloadgcc-49df367b17995c54fabe5bca290eede7dfab05b3.zip
gcc-49df367b17995c54fabe5bca290eede7dfab05b3.tar.gz
gcc-49df367b17995c54fabe5bca290eede7dfab05b3.tar.bz2
c++: Add fixed test [PR96474]
Was happy to find out that my recent dguide fix (r11-7483) fixed this test too. In particular, the + /* Wait until the enclosing scope is non-dependent. */ + if (DECL_CLASS_SCOPE_P (tmpl) + && dependent_type_p (DECL_CONTEXT (tmpl))) + return ptype; bit. gcc/testsuite/ChangeLog: PR c++/96474 * g++.dg/cpp1z/class-deduction83.C: New test.
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction83.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction83.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction83.C
new file mode 100644
index 0000000..63eab6a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction83.C
@@ -0,0 +1,13 @@
+// PR c++/96474
+// { dg-do compile { target c++17 } }
+
+template <typename = void>
+struct A
+{
+ template <typename = void>
+ struct B
+ {
+ };
+};
+
+A<>::B b;