After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644350 - Fortran: fails to parse some continuation lines
Fortran: fails to parse some continuation lines
Status: VERIFIED FIXED
Product: doxygen
Classification: Other
Component: general
1.7.3
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-03-09 21:46 UTC by Elliott Sales de Andrade
Modified: 2013-01-20 17:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test Fortran source code (5.53 KB, text/plain)
2011-03-09 21:47 UTC, Elliott Sales de Andrade
Details
PATCH: Handle continuation charaters in source code (8.83 KB, application/octet-stream)
2012-10-21 12:59 UTC, albert
Details

Description Elliott Sales de Andrade 2011-03-09 21:46:43 UTC
The Fortran standard states [1] that, for fixed form, "any character other than blank or zero" can be used as a continuation character in column 6. However, certain characters confuse Doxygen and produce incorrect output.

The attached file contains the same function but with a different continuation character for each. It compiles with `gfortran -Wall -ffixed-form test.f` and all functions produce the same output when run.

The subroutine `foo8` uses * as the continuation character, and Doxygen uses * as the type of the variable n instead of integer. The subroutine `foo3` uses # as the continuation character but I left it commented because Doxygen fails to parse the entire file if that subroutine is uncommented.

[1] For example, http://j3-fortran.org/doc/standing/archive/007/97-007r2/pdf/97-007r2.pdf section 3.3.2.3
Comment 1 Elliott Sales de Andrade 2011-03-09 21:47:19 UTC
Created attachment 183029 [details]
Test Fortran source code
Comment 2 albert 2011-03-10 18:09:18 UTC
This is a duplicate of bug 521861.
I've run the file with the problems with the version of Doxygen I have (i.e. with the patch for bug 521861) and it look to me that the results are OK.
Comment 3 Oleg Batrashev 2011-03-14 22:03:57 UTC
There were still 2 problems with the version in repository:
1) # was handled by preprocessor, although file extension was .f
2) * was a candidate for comment and then ignored by continuation rule

Both fixed in https://github.com/ogbash/doxygen-f90/commit/830e288d7c14e9aec6ed9934c52f867b344eac2d
Comment 4 albert 2011-03-15 06:43:20 UTC
In respect to problem 2) hasn't this been (more extensively) fixed with the bugfix as reported with bug 521861 ?
Comment 5 Oleg Batrashev 2011-03-15 09:21:01 UTC
(In reply to comment #4)
Sorry, I wrongly assumed everything is already on the trunk. It seems to do exactly the same, although differently. I revert my changes to avoid confusion.
Comment 6 albert 2012-10-21 12:59:52 UTC
Created attachment 226922 [details]
PATCH: Handle continuation charaters in source code
Comment 7 albert 2012-10-21 13:00:32 UTC
For fixed formatted code position 6 is of importance (continuation character).
The previously attached patch (comment 6)checks whether position 6 in fixed source form is used.
Especially the following characters: ' (single quote). " (double quote), #( hash), ! (exclamation mark) still made some problems.
The problems regarding position 6 in the fortranscanner.l were already handled, here the problems in fortrancode.l are handled.
Comment 8 Dimitri van Heesch 2013-01-05 13:56:32 UTC
Thanks, I'll include the patch in the next subversion update.
Comment 9 Dimitri van Heesch 2013-01-20 13:35:03 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.3.1. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.
Comment 10 albert 2013-01-20 17:34:37 UTC
Code is in, works as expected.