On 8/7/19 12:51 PM, Jakub Jelinek wrote: > On Wed, Aug 07, 2019 at 12:44:28PM +0200, Martin Liška wrote: >> On 8/7/19 11:51 AM, Richard Biener wrote: >>> I think the simplest way to achieve this is to not copy, aka clear, >>> DECL_IS_OPERATOR_* when cloning and removing arguments >>> (cloning for a constant align argument should be OK for example, as is >>> for a constant address). Or simply always when cloning. >> >> Ok, then I'm suggesting following tested patch. >> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > What about LAMBDA_FUNCTION, doesn't cloning which changes arguments in any > way invalidate that too, i.e. shouldn't it be just > FUNCTION_DECL_DECL_TYPE (new_node->decl) = NONE;
Well, how are lambdas involved in the new/delete DCE here? Lambdas with removed arguments should not interfere here. > instead? On the other side, if the cloning doesn't change arguments in any > way, do we still want to clear those flags? Well, I would consider it safer to drop it always. Martin > > Jakub >