aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-03-07 11:15:56 -0500
committerJason Merrill <jason@gcc.gnu.org>2019-03-07 11:15:56 -0500
commitae9b289201b6c6996b9c701109658adfb551327b (patch)
tree5904b313fcc2c714fdec4164b5f849dbbd1a1188 /gcc/testsuite
parent1738b52201b1ce28c9f869646f5412b8937ccfe6 (diff)
downloadgcc-ae9b289201b6c6996b9c701109658adfb551327b.zip
gcc-ae9b289201b6c6996b9c701109658adfb551327b.tar.gz
gcc-ae9b289201b6c6996b9c701109658adfb551327b.tar.bz2
PR c++/88820 - ICE with CTAD and member template used in DMI.
Here the problem was that in order to form a FUNCTION_DECL for foo<int> in the uninstantiated template, we were trying to deduce template args for S from the template parm itself, and failing. * pt.c (do_class_deduction): Handle parm used as its own arg. From-SVN: r269463
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/class-deduction64.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction64.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction64.C
new file mode 100644
index 0000000..3a06e6f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction64.C
@@ -0,0 +1,9 @@
+// PR c++/88820
+// { dg-do compile { target c++17 } }
+
+template <int> struct S;
+
+template <S> struct W {
+ template <typename> static int foo();
+ bool b = foo<int>();
+};