https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88820
--- Comment #14 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Fri Mar 8 21:40:28 2019 New Revision: 269514 URL: https://gcc.gnu.org/viewcvs?rev=269514&root=gcc&view=rev Log: 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. Added: branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp1z/class-deduction64.C Modified: branches/gcc-8-branch/gcc/cp/ChangeLog branches/gcc-8-branch/gcc/cp/pt.c