https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117661
Bug ID: 117661 Summary: Possible inconsistency with ns traversals in type-bound procedures Product: gcc Version: 14.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: rimvydas.jas at gmail dot com Target Milestone: --- $ cat foo.f90 module goo use, intrinsic :: ieee_arithmetic, only : ieee_is_nan include 'mpif.h' integer :: k end module module foo use goo, only: ! nothing contains subroutine used_foo end subroutine end module $ cat bar.F90 module bar #ifdef GLOBAL use foo, only: ! nothing #endif type :: ttt contains procedure, private, nopass :: init => ttt_init end type contains subroutine ttt_init() #ifndef GLOBAL use foo, only: #endif end subroutine end module $ mpifort -Wall -Wextra -c foo.f90 $ gfortran-14 -Wall -Wextra -c -S bar.F90 && grep -E '(ret|ieee)' bar.s ret call _gfortran_ieee_procedure_entry call _gfortran_ieee_procedure_exit ret $ gfortran-14 -Wall -Wextra -DGLOBAL -c -S bar.F90 && grep -E '(ret|ieee)' bar.s ret ret