Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-05 Thread Jason Merrill via Gcc-patches
(expression)) I'd prefer to loop over the elements of the pack, either here or (probably better) in potential_constant_expression. Ah, makes sense. Like so? Bootstrapped and regtested on x86_64-pc-linux-gnu. -- >8 -- Subject: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
ession != NULL_TREE > > > > + && (TREE_CODE (expression) == NONTYPE_ARGUMENT_PACK > > > > + || potential_constant_expression (expression)) > > > > > > I'd prefer to loop over the elements of the pack, either here or (probably > >

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
n_dependent_uneval_expression_p (expression) > > > || (processing_template_decl > > > - && potential_constant_expression (expression) > > > + && expression != NULL_TREE > > > + && (TREE_CODE (expression) == NONTYPE_ARGUMENT_PACK

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
sion) > > || (processing_template_decl > > - && potential_constant_expression (expression) > > + && expression != NULL_TREE > > + && (TREE_CODE (expression) == NONTYPE_ARGUMENT_PACK > > + || potenti

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 10/1/21 10:26, Patrick Palka wrote: On Fri, 1 Oct 2021, Jason Merrill wrote: On 10/1/21 09:46, Patrick Palka wrote: Here during partial ordering of the two partial specializations we end up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly thereafter because

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
On Fri, 1 Oct 2021, Jason Merrill wrote: > On 10/1/21 09:46, Patrick Palka wrote: > > Here during partial ordering of the two partial specializations we end > > up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly > > thereafter because uses_template_parms calls

Re: [PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Jason Merrill via Gcc-patches
On 10/1/21 09:46, Patrick Palka wrote: Here during partial ordering of the two partial specializations we end up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly thereafter because uses_template_parms calls potential_constant_expression which doesn't handle NONTYPE_ARGUMENT_PACK.

[PATCH] c++: unifying equal NONTYPE_ARGUMENT_PACKs [PR102547]

2021-10-01 Thread Patrick Palka via Gcc-patches
Here during partial ordering of the two partial specializations we end up in unify with parm=arg=NONTYPE_ARGUMENT_PACK, and crash shortly thereafter because uses_template_parms calls potential_constant_expression which doesn't handle NONTYPE_ARGUMENT_PACK. This patch fixes this by checking