Re: [PATCH] c++: Don't form a templated TARGET_EXPR in finish_compound_literal

2020-11-24 Thread Jason Merrill via Gcc-patches
On 11/16/20 5:45 PM, Patrick Palka wrote: On Mon, 16 Nov 2020, Jason Merrill wrote: On 11/13/20 10:43 AM, Patrick Palka wrote: On Thu, 12 Nov 2020, Jason Merrill wrote: On 11/12/20 1:27 PM, Patrick Palka wrote: The atom_cache in normalize_atom relies on the assumption that two equivalent (t

Re: [PATCH] c++: Don't form a templated TARGET_EXPR in finish_compound_literal

2020-11-16 Thread Patrick Palka via Gcc-patches
On Mon, 16 Nov 2020, Jason Merrill wrote: > On 11/13/20 10:43 AM, Patrick Palka wrote: > > On Thu, 12 Nov 2020, Jason Merrill wrote: > > > > > On 11/12/20 1:27 PM, Patrick Palka wrote: > > > > The atom_cache in normalize_atom relies on the assumption that two > > > > equivalent (templated) trees

Re: [PATCH] c++: Don't form a templated TARGET_EXPR in finish_compound_literal

2020-11-16 Thread Jason Merrill via Gcc-patches
On 11/13/20 10:43 AM, Patrick Palka wrote: On Thu, 12 Nov 2020, Jason Merrill wrote: On 11/12/20 1:27 PM, Patrick Palka wrote: The atom_cache in normalize_atom relies on the assumption that two equivalent (templated) trees (in the sense of cp_tree_equal) must use the same template parameters (

Re: [PATCH] c++: Don't form a templated TARGET_EXPR in finish_compound_literal

2020-11-13 Thread Patrick Palka via Gcc-patches
On Thu, 12 Nov 2020, Jason Merrill wrote: > On 11/12/20 1:27 PM, Patrick Palka wrote: > > The atom_cache in normalize_atom relies on the assumption that two > > equivalent (templated) trees (in the sense of cp_tree_equal) must use > > the same template parameters (according to find_template_parame

Re: [PATCH] c++: Don't form a templated TARGET_EXPR in finish_compound_literal

2020-11-12 Thread Jason Merrill via Gcc-patches
On 11/12/20 1:27 PM, Patrick Palka wrote: The atom_cache in normalize_atom relies on the assumption that two equivalent (templated) trees (in the sense of cp_tree_equal) must use the same template parameters (according to find_template_parameters). This assumption unfortunately doesn't always ho

Re: [PATCH] c++: Don't form a templated TARGET_EXPR in finish_compound_literal

2020-11-12 Thread Marek Polacek via Gcc-patches
On Thu, Nov 12, 2020 at 01:27:23PM -0500, Patrick Palka wrote: > The atom_cache in normalize_atom relies on the assumption that two > equivalent (templated) trees (in the sense of cp_tree_equal) must use > the same template parameters (according to find_template_parameters). > > This assumption un

[PATCH] c++: Don't form a templated TARGET_EXPR in finish_compound_literal

2020-11-12 Thread Patrick Palka via Gcc-patches
The atom_cache in normalize_atom relies on the assumption that two equivalent (templated) trees (in the sense of cp_tree_equal) must use the same template parameters (according to find_template_parameters). This assumption unfortunately doesn't always hold for TARGET_EXPRs, because cp_tree_equal i