I get a 404 for the web reference, and when I run your test program it runs for me without error when neither debug nor check is specified. When I use those two additional options in I get the error report presented in a Windows version of the Silverfrost Debugger, with the highlighted offending line better in the 32 bit version at line 5 (no line numbers given with that version), or on the DO loop line (line 12, and not your line 7) in the 64 bit version, which does have line numbers. The Windows debugger pops up even though I compiled at the command line. Odd. The variables window is more helpful in the /64 version than the /32, but the highlight better in /32. In both cases finding the bug would be easy, even ignoring your helpful comment! So agreed, they are reported inconsistently.
Yes, I remember giving names for files in the PROGRAM statement - some other compilers didn't need a program statement at all.
I'm surprised that a CDC expected 48 bit for a REAL, as the CDCs I used all used one 60-bit word. (6400, 6500, 6600 and 7600 machines used). The Elliot and ICL computers I used back then had 2 x 24-bit words for a REAL, but this wasn't what I expected from anything US-made.So I researched earlier CDC computer systems and they had 24 bit or 48 bit words, thus using 48 bit single precision REALs like contemporary UK computers.
The late Professor Zienkiewicz (noted for his work on the Finite Element method and related books and papers) once told me in conversation that as most US Universities used computers with 32-bit REAL precision, some of the algorithms he published didn't work for them, and he was subjected to a barrage of complaints that his published results (obtained with higher precision on ICL 1900 series machines) were not repeatable. Perhaps Zienkiewicz's correspondents couldn't afford CDC, and were cursed with some other brand, it not being a mistake (anecdotally) to specify IBM.
Although you have identified an error, it may not have mattered on the CDC architecture with their compiler. The same goes for uninitialised variables, as many compiler/computer combinations initialised everything to zero (see posts previously about what FTN95 does).
Your section headed 'Traceback' is useful, as I hadn't considered separate compilation. I suspect that having a CONTAINSed subroutine in a separate file would make this whole business harder to deal with.
When I was a card user, some compilers I used would gag at a completely blank card, and most of us eschewed them as they could violate some arbitrary limits as to how many cards one could submit, or worse in a commercial setting, could involve extra charges. One of the very positive things in modern Fortran is that it permits completely blank lines, not even needing to be blank comments.
As a matter of fact, provided that NCL does not exceed 101, it doesn't seem to matter with FTN95 without the additional switches, and since NCL has scope inside and outside the CONTAINSed subroutine, this could be an extraordinarily difficult bug to find if, say, NCL was set to greater than 501 when defined. (And I appreciate it is a demonstrator).
Regarding the uninitialised variables, it would have been a minor step in any revision of the Fortran standard to require all variables to be initialised to zero and the problem would then go away, because as far as I'm aware, they either aren't initialised at all, or they are initialised to zero, and they sure aren't initialised to anything else!
As far as reporting errors consistently between the two versions, I think it is more important that error reporting is done usefully than consistently (which I take to mean identically). I understand that /64 is a completely new and clean sweep as far as code generation etc is concerned, although that's only what I inferred. As such, it is more valuable to me than a simple extension of the 32 bit version, as it means I now have 2 separate compilers to run my code through. Other vendors' compilers are useless once one starts to use Clearwin+ ...
Mecej4, you should realise that it was tongue in cheek, and it is to be welcomed that you boldly continue to find bugs and inconsistencies!
Eddie