> On Thu, Nov 04, 2021 at 05:13:41PM +0100, Jan Hubicka via Gcc-patches wrote: > > this patch workarounds ICE in gimple_static_chain_flags. I added a > > sanity check that the nested function is never considered interposable > > because such situation makes no sense: nested functions have no static > > API and can not be safely merged across translation units. > > It turns out however that this triggers for Ada and also for Fortran if > > LTO partitioning separates nested function from its origin. The secon > > is bug in binds_to_current_def_p which I was fixing some time ago but it > > seems that the patch got lost :( > > Wouldn't the right fix be to ensure during partitioning that nested function > always goes into the same partition as its containing function?
I did some more poking about this and I am not able to reproduce any problems due to LTO partitioning: at the moment we bring symbol local we set its resolution info which is later used by binds_to_current_def_p and it seems to do the right thing (so I suppose I commited the patch while ago after all). However there are ices at compile time that are due to frontned producing non-static nested functions that seems wrong to me... Honza > > Jakub >