https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88820
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Thu Mar 7 16:15:56 2019 New Revision: 269463 URL: https://gcc.gnu.org/viewcvs?rev=269463&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: trunk/gcc/testsuite/g++.dg/cpp1z/class-deduction64.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c