A fix is available
APAR status
Closed as program error.
Error description
Subroutines that use the default implicit typing fails, with 1516-036 "undefined type" error, when in a module with a subroutine with an "implicit none" statement and a "contains" statement (it has (an) 'internal' subroutine(s) or function(s)). Example: $ cat tc.f90 program gm_test implicit none integer il, jl character(len=1) :: wa, wo wa = 'a' wo = 'o' jl = 1 call sub2 (wa) call sub3 (il, jl) write (6,*) 'il = ', il call sub4 (wo) stop end program gm_test ! remove these functions from the module and everything works fine. module mod contains subroutine sub2 (what) implicit double precision (a-h,o-z) character(len=1) :: what ! integer :: i i = 5 write (6,*) i, what end subroutine sub2 subroutine sub3 (ili, ilj) ! remove this statement and everything compiles fine. implicit none ! args integer :: ili,ilj ili=nbtot(ilj) contains integer function nbtot(lmax) integer lmax nbtot=(lmax**3+6*lmax**2+11*lmax+6)/6 end function nbtot end subroutine sub3 subroutine sub4 (who) ! implicit double precision (a-h,o-z) character(len=1) :: who ! integer :: j j = 5 write (6,*) j, who end subroutine sub4 end module $ xlf90 tc.f90 ** gm_test === End of Compilation 1 === "tc.f90", line 53.27: 1516-036 (S) Entity j has undefined type. "tc.f90", line 53.27: 1516-036 (S) Entity i has undefined type. ** mod === End of Compilation 2 === 1501-511 Compilation failed for file tc.f90. $
Local fix
1. remove the subs from the module 2. remove the "implicit none" declaration from sub3 3. declare variables explicitly 4. add a "implicit integer (i-n)" declaration as needed
Problem summary
Users of XL Fortran 10.1 are affected. The problem represents a missed case in the final processing of an input file which results in implicitly declared variables inside module procedures being processed again.
Problem conclusion
The missing case is now considered.
Temporary fix
Comments
APAR Information
APAR number
LI72190
Reported component name
XL FORTRAN SLES
Reported component ID
5724M1720
Reported release
A11
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2007-04-09
Closed date
2007-04-09
Last modified date
2007-04-09
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL FORTRAN SLES
Fixed component ID
5724M1720
Applicable component levels
RA11 PSN IY94407
UP06/09/13
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSB259","label":"XL Fortran Advanced Edition for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"A.1.1","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
24 February 2022