In general, Fortran specifications provide compiler developers with a huge area in how to implement things, so a language-level construct that forced (or even hinted) specific optimizations would be very non-Fortran-y.
What you usually do in modern Fortran does not indicate optimizations, but talk about what the compiler can use to decide which optimizations to implement. Thus, an example is a function designation without side effects or a subroutine PURE, so some optimizations are included (and in fact this can simplify the attachment).
Otherwise, as @Vladimir F points out, you can use compiler options that pre-secret this way.
In a similar vein, the CONTAINed routine seems to be more aggressively tied to gfortran, but this may or may not help.
source
share