diff options
author | Jason Merrill <jason@redhat.com> | 2019-03-07 11:15:56 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2019-03-07 11:15:56 -0500 |
commit | ae9b289201b6c6996b9c701109658adfb551327b (patch) | |
tree | 5904b313fcc2c714fdec4164b5f849dbbd1a1188 /gcc/testsuite | |
parent | 1738b52201b1ce28c9f869646f5412b8937ccfe6 (diff) | |
download | gcc-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.C | 9 |
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>(); +}; |