Topic: C comment bug in gFortran?
Has anyone any similar experience of the following strange behaviour?
I have just yesterday started experiencing it, in SF3.9.1117.
It seems mot likely to be something strange going on in gFortran, not in Simply Fortran.
I have started to find that the compiler is ignoring the first statement appearing immediately after a long C-comment line.
To make the compiler see and obey all such statements, I am having to insert an extra blank line after every C-comment line.
EXAMPLE
-----------
Whenever I insert one of these I always top and tail it with a particular C-comment, as shown below.
In this example:
- The C--------debug----... lines are exactly 72 chars long;
- The variables called CR$, Bold$ etc are defined elsewhere;
- F%O%LU has an integer value, of an opened Fortran output file unit.
- I use the Insight debugger all the time but I also insert debug print statements.
With THIS code,the program sends nothing to the output file:
C-------------------------------------------------------------debug----\
WRITE(F%O%LU,'(A)') CR$//CR$//CR$//Bold$//'SOLVE'//unBold$//CR$
|
[more debug statements]
|
C-------------------------------------------------------------debug----/
With THIS code, the program prints the word, "SOLVE" to the output file
(Please (note the extra blank line) after the first C--------- comment statement):
C-------------------------------------------------------------debug----\
WRITE(F%O%LU,'(A)') CR$//CR$//CR$//Bold$//'SOLVE'//unBold$//CR$
|
[more debug statements]
|
C-------------------------------------------------------------debug----/
---
John