c++ ICE with nested requirement as default tpl parm[PR94827]
authorNathan Sidwell <nathan@acm.org>
Thu, 30 Apr 2020 15:23:16 +0000 (08:23 -0700)
committerNathan Sidwell <nathan@acm.org>
Thu, 30 Apr 2020 15:23:16 +0000 (08:23 -0700)
commitc416c52bcdb120db5e8c53a51bd78c4360daf79b
treec37424a18d319249f3e06ede532edc9e53030167
parentb1983f4582bbe060b7da83578acb9ed653681fc8
c++ ICE with nested requirement as default tpl parm[PR94827]

Template headers are not incrementally updated as we parse its parameters.
We maintain a dummy level until the closing > when we replace the dummy with
a real parameter set.  requires processing was expecting a properly populated
arg_vec in current_template_parms, and then creates a self-mapping of parameters
from that.  But we don't need to do that, just teach map_arguments to look at
TREE_VALUE when args is NULL.

* constraint.cc (map_arguments): If ARGS is null, it's a
self-mapping of parms.
(finish_nested_requirement): Do not pass argified
current_template_parms to normalization.
(tsubst_nested_requirement): Don't assert no template parms.
gcc/cp/ChangeLog
gcc/cp/constraint.cc
gcc/testsuite/g++.dg/concepts/pr94827.C [new file with mode: 0644]