[Bug fortran/14959] [gfortran] not recognizing internal file in PURE/ELEMENATAL function
Tobias dot Schlueter at physik dot uni-muenchen dot de
gcc-bugzilla@gcc.gnu.org
Fri Apr 30 15:00:00 GMT 2004
------- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot de 2004-04-30 14:06 -------
(In reply to comment #1)
> Note g95 is slightly different than gfortran.
>
> With gfortran I get:
> Fatal Error: Can't open module file 'char_util.mod' for reading: No such file
or directory
This is because the testcase is not selfcontained.
ELEMENTAL FUNCTION FMT_GN(N)
! Gn IO Format Specifier
INTEGER(4), INTENT(IN) :: N
CHARACTER(LEN=12) :: FMT_GN
! Calling Sequence:
! N Width of Field
! FMT_GN Format character string
!
INTEGER(4) :: N2
CHARACTER(LEN=4) :: C_NUM, C_NUM2
INTEGER :: IOS
!
N2 = N - 7
WRITE(C_NUM ,'(I4)',IOSTAT=IOS) N
WRITE(C_NUM2,'(I4)',IOSTAT=IOS) N2
!
FMT_GN = '(1PG'//C_NUM//'.'//C_NUM2//')'
END FUNCTION FMT_GN
compiles flawlessly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14959
More information about the Gcc-bugs
mailing list