Topic: gfortran error compiling stop code ?

gfortran 7.2.0 has been out a while now, but suddently, when compiling code that has been around at least since June 2016 (Burkardt's site at fsu), I'm getting the following error, frequently:

".. undefined reference to '_gfortran_stop_numeric_f08' "

This tracks to a use of fortran stop with a numeric code, as in 'STOP 1'. Eliminating the stop code, leaving only 'STOP' results in error-free compilation/linking.

One suspects ('f08') this is a 'new' option from Fortran-08, which has been around a while. At least one site trackiing compilers says gfortran 7.2.0 fully implements STOP with codes.

Actually, before recent gfortran updates, I never saw this error - same codes compiled and linked.

Going thru all my codes (many in libraries) and changing them all seems a lot of work, especially when this is 'not supposed' to be a problem. Any other ideas would be appreciated; maybe I'm misreading something but not sure what.

jrc

Re: gfortran error compiling stop code ?

Well, I "Solved" this problem, by uninstalling SF v2.41 and reinstalling the older version SF 2.36. This removed gfortran 7.2.0 and reinstalled gfortran 6.3.0.

I'm now able to compile and link programs using the 'slatec 4.1' package proided by Simply Fortran, with no strange errors as reported in original post. Thanks, Jeff, for this package; I have *never* been able to compile the original Slatec library (f77 from Netlib) without errors. This library - which also was called the 'CMLIB' (Common Mathematical Library) by Sandia, Lanl, etc., in its day - has an enormous suite of funtions and routines.

jrc

Re: gfortran error compiling stop code ?

I'll have to see if SLATEC needs to be recompiled for the current compiler due to runtime changes.  My guess was that you were seeing the error because some object files were compiled with the previous version of Simply Fortran, causing a now-nonexistant runtime function (_gfortran_stop_numeric_f08) to remain referenced and cause an undefined error.  Sorry for the confusion!

Jeff Armstrong
Approximatrix, LLC