Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")

2016-05-18 Thread Jason Merrill
On 05/18/2016 10:22 AM, Paolo Carlini wrote: Hi, On 18/05/2016 16:08, Jason Merrill wrote: On 05/17/2016 05:57 PM, Paolo Carlini wrote: On 17/05/2016 20:15, Jason Merrill wrote: On 05/17/2016 04:47 AM, Paolo Carlini wrote: ... alternately, if the substance of my patchlet is right, we could

Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")

2016-05-18 Thread Paolo Carlini
Hi, On 18/05/2016 16:08, Jason Merrill wrote: On 05/17/2016 05:57 PM, Paolo Carlini wrote: On 17/05/2016 20:15, Jason Merrill wrote: On 05/17/2016 04:47 AM, Paolo Carlini wrote: ... alternately, if the substance of my patchlet is right, we could simplify a bit the logic per the below.

Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")

2016-05-18 Thread Jason Merrill
On 05/17/2016 05:57 PM, Paolo Carlini wrote: On 17/05/2016 20:15, Jason Merrill wrote: On 05/17/2016 04:47 AM, Paolo Carlini wrote: ... alternately, if the substance of my patchlet is right, we could simplify a bit the logic per the below. Here's a well-formed variant that was accepted by

Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")

2016-05-17 Thread Paolo Carlini
Hi, On 17/05/2016 20:15, Jason Merrill wrote: On 05/17/2016 04:47 AM, Paolo Carlini wrote: ... alternately, if the substance of my patchlet is right, we could simplify a bit the logic per the below. Here's a well-formed variant that was accepted by 4.5. Does your patch fix it? I also

Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")

2016-05-17 Thread Jason Merrill
On 05/17/2016 04:47 AM, Paolo Carlini wrote: ... alternately, if the substance of my patchlet is right, we could simplify a bit the logic per the below. Here's a well-formed variant that was accepted by 4.5. Does your patch fix it? I also think with your patch we can drop the C++11 check,

Re: [C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")

2016-05-17 Thread Paolo Carlini
... alternately, if the substance of my patchlet is right, we could simplify a bit the logic per the below. Thanks, Paolo. / Index: cp/call.c === --- cp/call.c (revision 236309) +++ cp/call.c (working copy)

[C++ Patch] PR 70466 ("ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real...")

2016-05-16 Thread Paolo Carlini
Hi, in this ICE during error recovery, the check in convert_like_real: if (CONSTRUCTOR_NELTS (expr) == 0 && FUNCTION_FIRST_USER_PARMTYPE (convfn) != void_list_node) is reached for a PARM_DECL as expr. I think that the correct way to avoid in general such problem is adding