https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85526
--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Thu, Apr 26, 2018 at 08:03:35AM +0000, mail at pietrodelugas dot it wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85526 > > --- Comment #4 from Pietro Delugas <mail at pietrodelugas dot it> --- > a quick and dirty workaround is to move all the routines in the "leng" > interface at the bottom of the file. But some compilers do not accept > this code as valid. > > A better solution is to move the leng subroutines in a module by > their own and import the interface. > With your original code, move checkFMT() to right after the CONTAINS statement. The code then compiles. No other functions need to move.