GNOME Bugzilla – Bug 567494
Fortran: Problem with blockdata sub-programs
Last modified: 2012-05-28 09:19:35 UTC
Hi, having recognised that my favourite code documentation system now also supports Fortran I recently installed doxygen version 1.5.8 on my Debian Etch system. Optimistically I let it loose on our old medium-sized (~18.000 LoC) F77 project. Unfortunately this test ended in a segmentation fault WARNING: fortrancode.l: stack empty!Generating code for file driver.f... WARNING: fortrancode.l: stack empty!Generating code for file energy.f... WARNING: fortrancode.l: stack empty!WARNING: fortrancode.l: stack empty!WARNING: fortrancode.l: stack empty!WARNING: fortrancode.l: stack empty!WARNING: fortrancode.l: stack empty!WARNING: fortrancode.l: stack empty!Segmentation fault I was able to pinpoint this problem to the BLOCKDATA sub-programs used in the code. Obviously there seems to be a problem with finding the end of the sub-program,since a single END statement is not recognised. I'll attach an example program showing the results for various combinations of "start" and "stop" statements for BLOCKDATA sub-programs. Note that for a single BLOCKDATA sub-program no obvious segfault occurs (valgrind doesn't detect one either) and doxygen runs through. In our code there are 7 such sub-programs, so the segfault appears to be related to their interplay. Good news is that after changing all sub-programs to BLOCKDATA .... END BLOCKDATA doxygen works nicely :) Regards Marcus
Created attachment 126272 [details] Example code demonstrating problem with BLOCKDATA
Created attachment 204410 [details] [review] PATCH resolving problems with block data This patch handles the usage of "block data" statement in Fortran, in the Fortran scanner as well as for the source code listing.
Thanks, I'll include the patch in the next subversion update.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.0. 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.
*** Bug 639126 has been marked as a duplicate of this bug. ***