Fixes are available
April 2011 Update for XL Fortran for Linux, V13.1
July 2011 Update for XL Fortran for Linux, V13.1
October 2011 Update for XL Fortran for Linux, V13.1
June 2012 Update for XL Fortran for Linux, V13.1
October 2012 Update for XL Fortran for Linux, V13.1
XL Fortran for Linux Fix Pack 8 (June 2013 Update) for 13.1
APAR status
Closed as program error.
Error description
The following test case compiles fine with "xlf90 test.f90". But it gives an error message when compiled with "xlf90 -qinit=f90ptr", complaining that "test.f90", line 1.1: 1513-191 (S) A variable declared in the scope of a module, world, that is of a derived type with default initialization, must have the SAVE attribute. Adding -qsave=defaultinit does not remove the above error. ===== TESTCASE: $cat test.f90 module dummy implicit none public type arrays real(8),dimension(:,:),pointer :: a ! => null() real(8),dimension(:,:),pointer :: b ! => null() end type arrays type(arrays) :: world contains subroutine init_array() allocate(world%a(10,10),world%b(100,100)) end subroutine init_array end module dummy program main use dummy print *,size(world%a) end program main ===== ACTUAL OUTPUT: $xlf90 test.f90 -qinit=f90ptr -qsave=defaultinit "test.f90", line 1.1: 1513-191 (S) A variable declared in the scope of a module, world, that is of a derived type with default initialization, must have the SAVE attribute. ===== EXPECTED OUTPUT: xlf90 test.f90 -qinit=f90ptr -qsave=defaultinit (no error or just a warning)
Local fix
Add SAVE attribute to the source manaually
Problem summary
PROBLEM DESCRIPTION: With -qinit=f90ptr and -qsave=defaultinit specified, if the type of a variable contains an uninitialized pointer component, and the variable is declared in a module, the compilation still failed with a message pointing out the SAVE attribute must be specified with the variable. USERS AFFECTED: Programs that use -qsave=defaultinit to imply the SAVE attribute for module variables of derived type with uninitialized pointer components.
Problem conclusion
Problem is fixed. Apply applicable PTF.
Temporary fix
Comments
APAR Information
APAR number
LI76083
Reported component name
XL FORTRAN LINU
Reported component ID
5724X1600
Reported release
D10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2011-04-27
Closed date
2011-04-27
Last modified date
2011-04-27
APAR is sysrouted FROM one or more of the following:
IZ90580
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL FORTRAN LINU
Fixed component ID
5724X1600
Applicable component levels
RD10 PSY
UP
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSAT4T","label":"XL Fortran for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"D10","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
17 October 2021