Built-in gfortran keyword

Is there a Fortran keyword equivalent to the C keyword "inline"?

If there is any specific keyword for the compiler, does gfortran exist?

+5
source share
2 answers

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.

+7
source

, . , , , . gfortran -finline-functions.

+1

All Articles