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 523156 - Fortran Prefix of routines gets stripped
Fortran Prefix of routines gets stripped
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.5.5-SVN
Other All
: Normal minor
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
: 625517 (view as bug list)
Depends on: 521453
Blocks:
 
 
Reported: 2008-03-18 13:06 UTC by Alin M Elena
Modified: 2012-05-19 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
solves the problem (3.54 KB, patch)
2008-03-18 13:10 UTC, Alin M Elena
none Details | Review
Patch based on current source code (1.34 KB, patch)
2010-11-08 20:35 UTC, albert
none Details | Review
PATCH: fixing order "recursive integer" for function definitions (2.35 KB, application/octet-stream)
2012-05-13 17:32 UTC, albert
  Details

Description Alin M Elena 2008-03-18 13:06:46 UTC
Please describe the problem:
The prefix of the routines gets stripped.
This makes impossible to say by inspecting the functions/subroutines list or the detailed description what is the prefix. The only place where the prefix is still present is the source code.

Steps to reproduce:
here is some code that will reproduce the problem

module test
implicit none

private
public :: DeleteList
  contains
!> \brief recursive function that deallocates all the nodes starting with root
!> \details
!> \author Alin M Elena
!> \date 14th of January 2006
!> \param root type(names), pointer the starting node
 recursive subroutine DeleteList(root)
    character(len=*), parameter :: myname = 'DeleteList'
    type(names), pointer :: root
    type(names), pointer :: current

    current=>root%next
    if (associated(current)) then
      call DeleteList(current)
    else
      deallocate(root)
    endif 
  end subroutine DeleteList
end module test


Actual results:
prefix gets stripped

Expected results:
prefix should remain

Does this happen every time?
Yes

Other information:
Comment 1 Alin M Elena 2008-03-18 13:10:51 UTC
Created attachment 107529 [details] [review]
solves the problem
Comment 2 Alin M Elena 2008-03-18 14:33:47 UTC
the patch contains the patch for the bug 521453 also
Comment 3 albert 2010-11-08 20:35:57 UTC
Created attachment 174096 [details] [review]
Patch based on current source code

This patch is the same patch as the patch from Alin M Elena from 2008 but now based on the newest svn source code. (I came independently to the same conclusion as Alin before I found this bug report)
Comment 4 albert 2010-11-08 20:40:38 UTC
*** Bug 625517 has been marked as a duplicate of this bug. ***
Comment 5 Dimitri van Heesch 2010-11-08 20:45:14 UTC
Thanks, I'll include the patch in the next subversion update.
Comment 6 Dimitri van Heesch 2011-01-03 19:01:25 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.3. 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 7 steindaube 2011-03-14 08:19:41 UTC
The problem is not fixed completely in version 1.7.3.



Please describe the problem:
Functions with the recursive keyword in Fortran are still not included correctly in the documentation. This may lead to the wrong comment shown for a subroutine that is defined after the recursive function.



Steps to reproduce:
here is some code that will reproduce the problem

MODULE test_module

  implicit none
  
  contains

  !> Comment for routine1
  subroutine routine1()
  end subroutine routine1
  
  !> Comment for function1
  integer recursive function function1()
    function1 = 42
  end function function1
  
  !> Comment for routine2
  subroutine routine2()
  end subroutine routine2
    
  !> Comment for routine3
  recursive subroutine routine3()
  end subroutine routine3
    
  !> Comment for routine4
  subroutine routine4()
  end subroutine routine4
    
end module test_module



Actual results:
The following list of routines is generated in the documentation which is of course incorrect (note the wrong comment for routine2 and the missing function1!):

Functions/Subroutines
subroutine 	routine1 ()
 	Comment for routine1.
subroutine 	routine2 ()
 	Comment for function1.
recursive subroutine 	routine3 ()
 	Comment for routine3.
subroutine 	routine4 ()
 	Comment for routine4. 



Expected results:
The function1 should be recognized and routine2 should have the correct comment.



Does this happen every time?
Yes



Other information:
Recursive subroutines seem to be recognized correctly since version 1.7.3.
Comment 8 albert 2012-05-13 17:32:37 UTC
Created attachment 213963 [details]
PATCH: fixing order "recursive integer" for function definitions

Not all combinations in the order of type definition and prefix (recursive, elemental, pure) were handled in the fortranscanner.l. In fortrancode.l these prefixes were not handled as well, resulting in not "green" words in the code for these prefixes.
Comment 9 Dimitri van Heesch 2012-05-13 18:00:06 UTC
Thanks, I'll include the patch in the next subversion update.
Comment 10 Dimitri van Heesch 2012-05-19 12:26:39 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.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.