PR c++/79092 - non-type args of different types are different
commit44677b5466c4d49f8c25b7e0740a60b88d48add4
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Nov 2017 20:13:48 +0000 (16 20:13 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Nov 2017 20:13:48 +0000 (16 20:13 +0000)
treef602a84e280c62dd314f2a97321a94ae4ebf7d50
parent16cba371293138ca40cc8618e2f2269787e6c49f
PR c++/79092 - non-type args of different types are different

* tree.c (cp_tree_equal): Check the type of constants.
* pt.c (unify) [TEMPLATE_PARM_INDEX]: Handle UNIFY_ALLOW_INTEGER
when comparing to previously deduced argument.
(maybe_convert_nontype_argument): New.
(convert_nontype_argument): Call it.
(tsubst_copy_and_build): Handle partial instantiation of
IMPLICIT_CONV_EXPR.
(unify): Ignore type when deducing from array bound.
(dependent_type_p_r): Handle DEFERRED_NOEXCEPT.
(value_dependent_expression_p): Any type-dependent expression is
value-dependent.  Handle IMPLICIT_CONV_EXPR.
* cp-tree.h (IMPLICIT_CONV_EXPR_NONTYPE_ARG): New.
* mangle.c (write_template_arg): Strip IMPLICIT_CONV_EXPR.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254843 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/mangle.c
gcc/cp/pt.c
gcc/cp/tree.c
gcc/testsuite/g++.dg/cpp1z/nontype-auto12.C [new file with mode: 0644]