https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96224

            Bug ID: 96224
           Summary: -fdump-tree-original could use more sophisticated or
                    mangled procedure names
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gcc dot gnu.org
  Target Milestone: ---

Consider the following code:

module mod
contains
  subroutine init
  end subroutine
end module

module init
  use mod, only : mod_init => init
  implicit none
contains
  subroutine sub
    call mod_init
    call init
  contains
    subroutine init
    end subroutine
  end subroutine
end module


Compiling the above (after applying my patch for PR89574; otherwise module init
needs to be renamed) leads to:

init ()
{

}


init ()
{

}


sub ()
{
  static void init (void);

  init ();
  init ();
}


Grepping the resulting assembler suggests that the proper calls are generated:

% grep call foo.s
        call    __mod_MOD_init
        call    init.0

So this is likely only a cosmetic problem, although an annoying one.

Reply via email to