Re: [PATCH] c++: Delegating constructor in constexpr init [PR94772]

2020-04-27 Thread Jason Merrill via Gcc-patches
On 4/27/20 3:33 PM, Patrick Palka wrote: On Mon, 27 Apr 2020, Jason Merrill wrote: On 4/27/20 10:45 AM, Patrick Palka wrote: On Mon, 27 Apr 2020, Patrick Palka wrote: On Mon, 27 Apr 2020, Jason Merrill wrote: On 4/26/20 6:48 PM, Patrick Palka wrote: In the testcase below, the call to the

Re: [PATCH] c++: Delegating constructor in constexpr init [PR94772]

2020-04-27 Thread Patrick Palka via Gcc-patches
On Mon, 27 Apr 2020, Jason Merrill wrote: > On 4/27/20 10:45 AM, Patrick Palka wrote: > > On Mon, 27 Apr 2020, Patrick Palka wrote: > > > > > On Mon, 27 Apr 2020, Jason Merrill wrote: > > > > > > > On 4/26/20 6:48 PM, Patrick Palka wrote: > > > > > In the testcase below, the call to the target c

Re: [PATCH] c++: Delegating constructor in constexpr init [PR94772]

2020-04-27 Thread Jason Merrill via Gcc-patches
On 4/27/20 10:45 AM, Patrick Palka wrote: On Mon, 27 Apr 2020, Patrick Palka wrote: On Mon, 27 Apr 2020, Jason Merrill wrote: On 4/26/20 6:48 PM, Patrick Palka wrote: In the testcase below, the call to the target constructor foo{} from foo's delegating constructor is encoded as the INIT_EXPR

Re: [PATCH] c++: Delegating constructor in constexpr init [PR94772]

2020-04-27 Thread Patrick Palka via Gcc-patches
On Mon, 27 Apr 2020, Patrick Palka wrote: > On Mon, 27 Apr 2020, Jason Merrill wrote: > > > On 4/26/20 6:48 PM, Patrick Palka wrote: > > > In the testcase below, the call to the target constructor foo{} from foo's > > > delegating constructor is encoded as the INIT_EXPR > > > > > >*(struct f

Re: [PATCH] c++: Delegating constructor in constexpr init [PR94772]

2020-04-27 Thread Patrick Palka via Gcc-patches
On Mon, 27 Apr 2020, Jason Merrill wrote: > On 4/26/20 6:48 PM, Patrick Palka wrote: > > In the testcase below, the call to the target constructor foo{} from foo's > > delegating constructor is encoded as the INIT_EXPR > > > >*(struct foo *) this = AGGR_INIT_EXPR <4, __ct_comp, D.2140, ...>;

Re: [PATCH] c++: Delegating constructor in constexpr init [PR94772]

2020-04-26 Thread Jason Merrill via Gcc-patches
On 4/26/20 6:48 PM, Patrick Palka wrote: In the testcase below, the call to the target constructor foo{} from foo's delegating constructor is encoded as the INIT_EXPR *(struct foo *) this = AGGR_INIT_EXPR <4, __ct_comp, D.2140, ...>; During initialization of the variable 'bar', we prematurel

[PATCH] c++: Delegating constructor in constexpr init [PR94772]

2020-04-26 Thread Patrick Palka via Gcc-patches
In the testcase below, the call to the target constructor foo{} from foo's delegating constructor is encoded as the INIT_EXPR *(struct foo *) this = AGGR_INIT_EXPR <4, __ct_comp, D.2140, ...>; During initialization of the variable 'bar', we prematurely set TREE_READONLY on bar's CONSTRUCTOR in