Re: [C++ PATCH] c++/78495 inherited ctor and inivis-ref parm

2017-01-20 Thread Jason Merrill
On Fri, Jan 20, 2017 at 11:12 AM, Nathan Sidwell wrote: > On 01/20/2017 08:45 AM, Jason Merrill wrote: > >> Hmm, I would guess that if we're going to do this we need to also use >> forward_parm in maybe_thunk_body. > > > Apparently not needed. maybe_thunk_body is called after we've genericized >

Re: [C++ PATCH] c++/78495 inherited ctor and inivis-ref parm

2017-01-20 Thread Nathan Sidwell
On 01/20/2017 08:45 AM, Jason Merrill wrote: Hmm, I would guess that if we're going to do this we need to also use forward_parm in maybe_thunk_body. Apparently not needed. maybe_thunk_body is called after we've genericized the parent ctor. That ctor's parms have been bashed to reference an

Re: [C++ PATCH] c++/78495 inherited ctor and inivis-ref parm

2017-01-20 Thread Jason Merrill
On Fri, Jan 20, 2017 at 8:15 AM, Nathan Sidwell wrote: > Bug 78495 is a wrong code bug caused by an invisiref parm. When building > the inherited ctor, we use forward_parm to create a forwarding reference. > That code generation considers the type of the parm to be 'T'. We thus end > up with a t

[C++ PATCH] c++/78495 inherited ctor and inivis-ref parm

2017-01-20 Thread Nathan Sidwell
Bug 78495 is a wrong code bug caused by an invisiref parm. When building the inherited ctor, we use forward_parm to create a forwarding reference. That code generation considers the type of the parm to be 'T'. We thus end up with a tree that looks like *&PARM The subsequent call gets 'CALL_