Re: [PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-03-01 Thread Jason Merrill via Gcc-patches
On 3/1/21 7:59 PM, Marek Polacek wrote: On Mon, Mar 01, 2021 at 03:08:58PM -0500, Jason Merrill wrote: On 3/1/21 2:54 PM, Marek Polacek wrote: On Thu, Feb 25, 2021 at 10:45:29PM -0500, Jason Merrill via Gcc-patches wrote: On 2/25/21 5:41 PM, Marek Polacek wrote: On Thu, Feb 25, 2021 at

Re: [PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-03-01 Thread Marek Polacek via Gcc-patches
On Mon, Mar 01, 2021 at 03:08:58PM -0500, Jason Merrill wrote: > On 3/1/21 2:54 PM, Marek Polacek wrote: > > On Thu, Feb 25, 2021 at 10:45:29PM -0500, Jason Merrill via Gcc-patches > > wrote: > > > On 2/25/21 5:41 PM, Marek Polacek wrote: > > > > On Thu, Feb 25, 2021 at 10:59:49AM -0500, Jason

Re: [PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-03-01 Thread Jason Merrill via Gcc-patches
On 3/1/21 2:54 PM, Marek Polacek wrote: On Thu, Feb 25, 2021 at 10:45:29PM -0500, Jason Merrill via Gcc-patches wrote: On 2/25/21 5:41 PM, Marek Polacek wrote: On Thu, Feb 25, 2021 at 10:59:49AM -0500, Jason Merrill wrote: On 2/12/21 6:12 PM, Marek Polacek wrote: We represent deduction

Re: [PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-03-01 Thread Marek Polacek via Gcc-patches
On Thu, Feb 25, 2021 at 10:45:29PM -0500, Jason Merrill via Gcc-patches wrote: > On 2/25/21 5:41 PM, Marek Polacek wrote: > > On Thu, Feb 25, 2021 at 10:59:49AM -0500, Jason Merrill wrote: > > > On 2/12/21 6:12 PM, Marek Polacek wrote: > > > > We represent deduction guides with FUNCTION_DECLs, but

Re: [PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/25/21 5:41 PM, Marek Polacek wrote: On Thu, Feb 25, 2021 at 10:59:49AM -0500, Jason Merrill wrote: On 2/12/21 6:12 PM, Marek Polacek wrote: We represent deduction guides with FUNCTION_DECLs, but they are built without DECL_CONTEXT Hmm, that seems wrong: "A deduction-guide shall be

Re: [PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-02-25 Thread Marek Polacek via Gcc-patches
On Thu, Feb 25, 2021 at 10:59:49AM -0500, Jason Merrill wrote: > On 2/12/21 6:12 PM, Marek Polacek wrote: > > We represent deduction guides with FUNCTION_DECLs, but they are built > > without DECL_CONTEXT > > Hmm, that seems wrong: "A deduction-guide shall be declared in the > same scope as the

Re: [PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-02-25 Thread Jason Merrill via Gcc-patches
On 2/12/21 6:12 PM, Marek Polacek wrote: We represent deduction guides with FUNCTION_DECLs, but they are built without DECL_CONTEXT Hmm, that seems wrong: "A deduction-guide shall be declared in the same scope as the corresponding class template and, for a member class template, with the same

Re: [PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-02-24 Thread Marek Polacek via Gcc-patches
Ping. On Fri, Feb 12, 2021 at 06:12:12PM -0500, Marek Polacek via Gcc-patches wrote: > We represent deduction guides with FUNCTION_DECLs, but they are built > without DECL_CONTEXT, leading to an ICE in type_dependent_expression_p > on the assert that the type of a function template with no

[PATCH] c++: ICE with deduction guide in checking type-dep [PR99009, PR97034]

2021-02-12 Thread Marek Polacek via Gcc-patches
We represent deduction guides with FUNCTION_DECLs, but they are built without DECL_CONTEXT, leading to an ICE in type_dependent_expression_p on the assert that the type of a function template with no dependent (innermost!) template arguments must be non-dependent. Consider the attached