Compare ARGUMENT_PACKS [pr93933]
authorNathan Sidwell <nathan@acm.org>
Thu, 27 Feb 2020 18:50:36 +0000 (10:50 -0800)
committerNathan Sidwell <nathan@acm.org>
Thu, 27 Feb 2020 18:50:36 +0000 (10:50 -0800)
commit9d2d283367a407c1ba9ecdb8590f9295828e25f8
tree670766297b077469d190cbf4fad93b2c4191d4c2
parentba49e9eb18730cc71e5ffc302092f87ef6821f24
Compare ARGUMENT_PACKS [pr93933]

This implements Jason's suggested approach: 'I'd think that the bug is
that we're treating them as types in the first place; they aren't
types, so they shouldn't reach comptypes.  I'd lean toward adding an
assert to that effect and fixing the caller to use
e.g. template_args_equal.'

PR c++/93933
* pt.c (template_args_equal): Pass ARGUMENT_PACKS through to
cp_tree_equal.
* tree.c (cp_tree_equal): Compare ARGUMENT_PACKS here,
* typeck.c (comptypes): Assert we don't get any argument packs.
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/testsuite/g++.dg/concepts/pr93933.C [new file with mode: 0644]