Fixes are available
XL Fortran for AIX Fix Pack 11 (May 2015 PTF) for 14.1
XL Fortran for AIX Fix Pack 12 (August 2015 Update) for 14.1
XL Fortran for AIX Fix Pack 15 (April 2016 Update) for 14.1
XL Fortran for AIX Fix Pack 16 (July 2016 Update) for 14.1
XL Fortran for AIX Fix Pack 17 (November 2016 Update) for 14.1
XL Fortran for AIX Fix Pack 18 (February 2017 Update) for 14.1
XL Fortran for AIX Fix Pack 19 (August 2017 Update) for 14.1
XL Fortran for AIX Fix Pack 14 (December 2015 Update) for 14.1
APAR status
Closed as program error.
Error description
A member variable with an initialization in a nested derived type is not getting initialized. It does get initialized when a subroutine is defined for the nested type. ===== COMPILE COMMAND: xlf2003 testrecursivedefault.F90 ===== TESTCASE: module define_types implicit none type vector_wrap real, allocatable :: data(:) integer :: metadata = 5 contains #ifndef WORKING procedure :: vector_assign_vec generic :: assignment(=) => vector_assign_vec #endif end type vector_wrap type foo type(vector_wrap) :: my_vector end type foo contains subroutine vector_assign_vec(self, other) class( vector_wrap ), intent(inout) :: self type( vector_wrap ), intent(in) :: other end subroutine vector_assign_vec end module define_types program test_recursive_default use define_types implicit none type(foo) :: my_foo print *, my_foo%my_vector%metadata end program test_recursive_default ===== ACTUAL OUTPUT: random large negative number ===== EXPECTED OUTPUT: 5
Local fix
Define the subroutine
Problem summary
PROBLEM DESCRIPTION: The problem is the compiler does not process the assignment for the nonallocatable, nonpointer component that has default initialization if the type has defined assignment. USERS AFFECTED: Users who have a derived type that has default initialization for a nonallocatable, nonpointer component and also has defined assignment. If such a type is used to declare a component of a container type, the default initialization does not happen.
Problem conclusion
The issue has been corrected.
Temporary fix
Comments
APAR Information
APAR number
IV72044
Reported component name
XL FORTRAN FOR
Reported component ID
5725C7400
Reported release
E10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2015-04-10
Closed date
2015-05-25
Last modified date
2015-05-25
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 FOR
Fixed component ID
5725C7400
Applicable component levels
[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSAT4T","label":"XL Fortran for Linux"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"14.1","Edition":"","Line of Business":{"code":"LOB73","label":"Power TPS"}}]
Document Information
Modified date:
19 August 2024