Re: [PATCH] c++: ICE with template NEW_EXPR [PR105803]

2022-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/22 16:33, Marek Polacek wrote: On Thu, Jun 02, 2022 at 04:26:27PM -0400, Jason Merrill wrote: On 6/2/22 16:10, Marek Polacek wrote: index 1346a1d4c10..2bbd8785627 100644 --- a/gcc/cp/constexpr.cc +++ b/gcc/cp/constexpr.cc @@ -9039,10 +9039,18 @@ potential_constant_expression_1 (tree t, b

Re: [PATCH] c++: ICE with template NEW_EXPR [PR105803]

2022-06-02 Thread Marek Polacek via Gcc-patches
On Thu, Jun 02, 2022 at 04:26:27PM -0400, Jason Merrill wrote: > On 6/2/22 16:10, Marek Polacek wrote: > > index 1346a1d4c10..2bbd8785627 100644 > > --- a/gcc/cp/constexpr.cc > > +++ b/gcc/cp/constexpr.cc > > @@ -9039,10 +9039,18 @@ potential_constant_expression_1 (tree t, bool > > want_rval, bool

Re: [PATCH] c++: ICE with template NEW_EXPR [PR105803]

2022-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/22 16:10, Marek Polacek wrote: On Thu, Jun 02, 2022 at 03:42:15PM -0400, Jason Merrill wrote: On 6/2/22 10:03, Marek Polacek wrote: On Thu, Jun 02, 2022 at 08:42:36AM -0400, Patrick Palka wrote: On Wed, 1 Jun 2022, Marek Polacek via Gcc-patches wrote: Here we ICE because value_depende

Re: [PATCH] c++: ICE with template NEW_EXPR [PR105803]

2022-06-02 Thread Marek Polacek via Gcc-patches
On Thu, Jun 02, 2022 at 03:42:15PM -0400, Jason Merrill wrote: > On 6/2/22 10:03, Marek Polacek wrote: > > On Thu, Jun 02, 2022 at 08:42:36AM -0400, Patrick Palka wrote: > > > On Wed, 1 Jun 2022, Marek Polacek via Gcc-patches wrote: > > > > > > > Here we ICE because value_dependent_expression_p ge

Re: [PATCH] c++: ICE with template NEW_EXPR [PR105803]

2022-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/22 10:03, Marek Polacek wrote: On Thu, Jun 02, 2022 at 08:42:36AM -0400, Patrick Palka wrote: On Wed, 1 Jun 2022, Marek Polacek via Gcc-patches wrote: Here we ICE because value_dependent_expression_p gets a NEW_EXPR whose operand is a type, and we go to the default case which just calls

Re: [PATCH] c++: ICE with template NEW_EXPR [PR105803]

2022-06-02 Thread Marek Polacek via Gcc-patches
On Thu, Jun 02, 2022 at 08:42:36AM -0400, Patrick Palka wrote: > On Wed, 1 Jun 2022, Marek Polacek via Gcc-patches wrote: > > > Here we ICE because value_dependent_expression_p gets a NEW_EXPR > > whose operand is a type, and we go to the default case which just > > calls v_d_e_p on each operand o

Re: [PATCH] c++: ICE with template NEW_EXPR [PR105803]

2022-06-02 Thread Patrick Palka via Gcc-patches
On Wed, 1 Jun 2022, Marek Polacek via Gcc-patches wrote: > Here we ICE because value_dependent_expression_p gets a NEW_EXPR > whose operand is a type, and we go to the default case which just > calls v_d_e_p on each operand of the NEW_EXPR. Since one of them > is a type, we crash on the new asser

[PATCH] c++: ICE with template NEW_EXPR [PR105803]

2022-06-01 Thread Marek Polacek via Gcc-patches
Here we ICE because value_dependent_expression_p gets a NEW_EXPR whose operand is a type, and we go to the default case which just calls v_d_e_p on each operand of the NEW_EXPR. Since one of them is a type, we crash on the new assert in t_d_e_p. t_d_e_p has code to handle {,VEC_}NEW_EXPR, which a