[Bug c++/84979] [6/7/8 Regression] ICE with auto as template parameter and -fconcepts
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84979 --- Comment #4 from Alexandre Oliva --- Author: aoliva Date: Thu Apr 5 04:26:36 2018 New Revision: 259124 URL: https://gcc.gnu.org/viewcvs?rev=259124=gcc=rev Log: [PR c++/84979] reject auto in explicit tmpl args for tmpl-fn With concepts, we accept auto in explicit template arguments, but we should only accept them for template classes. Passing them to template functions or variables is not allowed. So, reject it, at parse time if possible, at specialization time otherwise. for gcc/cp/ChangeLog PR c++/84979 * pt.c (check_auto_in_tmpl_args): New. (tsubst_qualified_id): Use it to reject template args referencing auto for non-type templates. * parser.c (cp_parser_template_id): Likewise. * cp-tree.h (check_auto_in_tmpl_args): Declare. * typeck2.c (build_functional_cast): Report correct location for invalid use of auto. for gcc/testsuite/ChangeLog PR c++/84979 * g++.dg/concepts/pr84979.C: New. * g++.dg/concepts/pr84979-2.C: New. * g++.dg/concepts/pr84979-3.C: New. Added: trunk/gcc/testsuite/g++.dg/concepts/pr84979-2.C trunk/gcc/testsuite/g++.dg/concepts/pr84979-3.C trunk/gcc/testsuite/g++.dg/concepts/pr84979.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/parser.c trunk/gcc/cp/pt.c trunk/gcc/cp/typeck2.c trunk/gcc/testsuite/ChangeLog
[Bug c++/84979] [6/7/8 Regression] ICE with auto as template parameter and -fconcepts
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84979 --- Comment #3 from Alexandre Oliva --- The patch has caused a number of tests in g++.dg/concepts to regress. Looking into it.
[Bug c++/84979] [6/7/8 Regression] ICE with auto as template parameter and -fconcepts
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84979 Alexandre Oliva changed: What|Removed |Added Status|NEW |ASSIGNED CC||aoliva at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |aoliva at gcc dot gnu.org --- Comment #2 from Alexandre Oliva --- Created attachment 43740 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43740=edit candidate patch This is a patch I'm testing. It fixes the problem at hand, but leaves other related problems unfixed, see the added testcases.
[Bug c++/84979] [6/7/8 Regression] ICE with auto as template parameter and -fconcepts
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84979 Richard Biener changed: What|Removed |Added Priority|P3 |P2 Target Milestone|--- |6.5
[Bug c++/84979] [6/7/8 Regression] ICE with auto as template parameter and -fconcepts
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84979 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-03-20 CC||marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Liška --- Confirmed.