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

--- Comment #3 from Denis <dmitrievdv242 at gmail dot com> ---
(In reply to Thomas Koenig from comment #2)
> (In reply to Denis from comment #0)
> 
> > The bug occurs when you have a module with some name (lets name it init) and
> > it uses a module with an aliased subroutine or function with the same name
> > (init) - see the attached source file. 
> 
> That is invalid, right?

No, this is valid, because 'init' module doesn't use the module with this
subroutine. It uses the module, in which this subroutine is aliased as
'test_init'. And the real 'init' subroutine is in another module. So, the
module used in 'init' doesn't contain the 'init' subroutine directly and it is
expected that 'init' module doesn't care about existence of this subroutine.
See the source file for clarification. 

Also I think this must work even with directly aliased subroutine, like

module init
  use test, test_init => init

Reply via email to