Re: [PATCH] Fix PR ipa/113996

2024-03-14 Thread Jan Hubicka
> > Patch is still OK, but ipa-ICF will only identify the functions if > > static chain is unused. Perhaps just picking the winning candidate to be > > version without static chain and making ipa-inline to not ICE when calls > > with static chain lands to function with no static chain would help us

Re: [PATCH] Fix PR ipa/113996

2024-03-12 Thread Eric Botcazou
> Patch is still OK, but ipa-ICF will only identify the functions if > static chain is unused. Perhaps just picking the winning candidate to be > version without static chain and making ipa-inline to not ICE when calls > with static chain lands to function with no static chain would help us > to op

Re: [PATCH] Fix PR ipa/113996

2024-03-12 Thread Jan Hubicka
> > > On 3/11/24 4:38 PM, Eric Botcazou wrote: > > Hi, > > > > this is a regression present on all active branches: the attached Ada > > testcase > > triggers an assertion failure when compiled with -O2 -gnatp -flto: > > > >/* Initialize the static chain. */ > >p = DECL_STRUCT_FUNCTIO

Re: [PATCH] Fix PR ipa/113996

2024-03-11 Thread Jeff Law
On 3/11/24 4:38 PM, Eric Botcazou wrote: Hi, this is a regression present on all active branches: the attached Ada testcase triggers an assertion failure when compiled with -O2 -gnatp -flto: /* Initialize the static chain. */ p = DECL_STRUCT_FUNCTION (fn)->static_chain_decl; gcc_as

[PATCH] Fix PR ipa/113996

2024-03-11 Thread Eric Botcazou
Hi, this is a regression present on all active branches: the attached Ada testcase triggers an assertion failure when compiled with -O2 -gnatp -flto: /* Initialize the static chain. */ p = DECL_STRUCT_FUNCTION (fn)->static_chain_decl; gcc_assert (fn != current_function_decl); if (p)