GNOME Bugzilla – Bug 740366
Fortran: Inconsistent Indentation Confuses Parser
Last modified: 2014-11-22 11:50:39 UTC
I'm not sure if this is a bug and it may be related to a previously submitted bug that's labeled as "wont-fix": https://bugzilla.gnome.org/show_bug.cgi?id=704518 I have a project with a few Fortran files where the start of some subroutine declarations is indented by 6 spaces and the end of the declarations is indented by 5 spaces. This causes the scanner to report errors on a line that is beyond the end of the file. Changing the indentation of the end statement to match that of the subroutine declaration fixes the problem. Oddly, any other indentation pattern works as expected. I attached an tar.gz file with an example Fortran file that hopefully produces the error when parsed, my Doxyfile and the output from running doxygen on my machine. Command used to produce error: (cat Doxyfile ; echo "INPUT=test.F90") | doxygen - Thanks
Created attachment 290997 [details] files for reproducing Files for reproducing error: 1. test.F90 : two-line Fortran program that confuses doxygen Fortran scanner 2. Doxyfile : my configuration file 3. doxygen-output : output of Doxygen on my machine
The Fortran parser sees the code as fixed formatted Fortran code and thus the End statement is not a proper End statement. This problem has also been identified by (a.o.) bug_625601 and for this reason the EXTENSION_MAPPING in version 1.8.8 has been extended so the user can set the right code type: EXTENSION_MAPPING = f90=fortranfree I think this report should be set to RESOLVED DUPLICATE
*** This bug has been marked as a duplicate of bug 625601 ***