On Fri, Feb 10, 2023 at 10:24 AM Steve Kargl via Fortran <fortran@gcc.gnu.org> wrote: > > would it be possible to extend gfortran attribute support to handle > > NOINLINE too? Like: "!GCC$ ATTRIBUTES noinline :: ...". > > It looks to me like you are conflating three independent topics. > What does NOINLINE have to do with WEAK? What does WEAK have > to do with NORETURN?
As I wrote these are optional (different issues, quite useful to have but still easy to work around with different means), the main issue is still missing NOINLINE for -flto. > More importantly what is the effect of NOINLINE if a user > does not specify the -flto option? Does this block inlining > regardless of LTO? > > -- > steve Yes, there is no way to differentiate between LTO and non-LTO compilations (at least from what I have seen in the code). As long as subroutines/functions are in separate compilation units, this has no effect for non-LTO builds anyway. Main issue is to deal with unintentional over inlining between different compilation units with lto1 backend. Best regards, Rimvydas