Topic: Old-Style Fortran Formatting (-fdec)

I am (slowly) converting an old large f77 program to f95. Unfortunately there is a lot of complex output taking advantage of old-style Fortran formatting (using "0", "+", " ", and "1"s). If ignored, the resulting output is all over the place.

In the GNU Fortran User Manual, to restore that type of output visually, there is an (not-recommended) option of "-fdec".
I realize that this shouldn't be used, but I need to do a before / after incremental change to test main and edge cases.

When I try to incorporate this option into my Project, an error is generated saying that this option does not exist.
I then tried to invoke gfortran directly in the command line with this option with the same result.
I suspect that this is a Compiler Build issue, but figured I would ask first.

(Note: Everything else in my program (finally) compiles correctly without this flag --- this was a final tweek)

Thanks for the Advice!

Re: Old-Style Fortran Formatting (-fdec)

What version of Simply Fortran are you currently using, and what operating system are you on?  This option should work with Simply Fortran 2.39 on both Windows and macOS.

Jeff Armstrong
Approximatrix, LLC

Re: Old-Style Fortran Formatting (-fdec)

Apparently I am behind.
I am on Version 2.31 Build 2290 using GNU Fortran 6.1.0

I will download the latest system and reinstall and see if there is a difference first.
Thanks.

Re: Old-Style Fortran Formatting (-fdec)

So after the Update (thanks for that!!), it solved that error, but now I am getting:

Could not locate source code for “/Users/jeff/Workspace/gcc/obj/gcc-native/x86_64-apple-darwin10.8.0/libgcc/enable-execte-stack.c”

in a Warning Box; the compile continues without error, but now hangs within the debugger at a recursive subroutine.

Re: Old-Style Fortran Formatting (-fdec)

KarlO wrote:

So after the Update (thanks for that!!), it solved that error, but now I am getting:

Could not locate source code for “/Users/jeff/Workspace/gcc/obj/gcc-native/x86_64-apple-darwin10.8.0/libgcc/enable-execte-stack.c”

in a Warning Box; the compile continues without error, but now hangs within the debugger at a recursive subroutine.

The warning is actually a bug.  The debugger interface should know that the source is unavailable.  I'll have to look into it.

However, I don't think the debugger is actually hanging.  If you select "Step Out" in the Debug menu, it might return to the calling subroutine.  When you see this message, are you clicking "Step Into" or "Step Over?"

Jeff Armstrong
Approximatrix, LLC

Re: Old-Style Fortran Formatting (-fdec)

Both.
I put in a Breakpoint at the point it generates the message, and both ways appear to generate the same thing.
BTW - This is only happening on the Mac; when I try this on Windows, everything runs fine.
(haha - which means, of course, only develop on Windows, but I always like options!)

Re: Old-Style Fortran Formatting (-fdec)

Version 2.40 is out, which should fix the macOS issue.

Jeff Armstrong
Approximatrix, LLC