Fixes are available
January 2012 PTF for XL Fortran for AIX, V13.1
April 2012 PTF for XL Fortran for AIX, V13.1
July 2012 PTF for XL Fortran for AIX, V13.1
October 2012 PTF for XL Fortran for AIX, V13.1
February 2013 PTF for XL Fortran for AIX, V13.1
May 2013 PTF for XL Fortran for AIX, V13.1
XL Fortran for AIX Fix Pack 15 (August 2013 PTF) for 13.1
XL Fortran for AIX Fix Pack 16 (November 2013 PTF) for 13.1
XL Fortran for AIX Fix Pack 17 (February 2014 PTF) for 13.1
XL Fortran for AIX Fix Pack 21 (April 2015 PTF) for 13.1
XL Fortran for AIX Fix Pack 22 (September 2015 PTF) for 13.1
XL Fortran for AIX Fix Pack 23 (March 2016 PTF) for 13.1
XL Fortran for AIX Fix Pack 24 (September 2016 PTF) for 13.1
APAR status
Closed as program error.
Error description
When the either the MAXVAL or MINVAL functions are applied on NaN masked elements, an invalid exception is encountered during runtime. In the testcase below, 'tmparray' is a one-dimension array with two elements, the first of which is not explicitely assigned a value. Compiler option -qinitauto=7FBFFFFF is used to assign a float NaN to the first element. When compiling this test case with '-qflttrap=invalid:enable -qinitauto=7FBFFFFF -qnooptimize', an invalid exception is observed. ===== TESTCASE: program main real tmparray(2) tmparray(2) = 10. print *, maxval(tmparray, mask = (/.false., .true./)) end program main ===== ACTUAL OUTPUT: $ xlf -qflttrap=invalid:enable -qinitauto=7FBFFFFF -qnooptimize main.f ** main === End of Compilation 1 === 1501-510 Compilation successful for file main.f. $ ./a.out Trace/BPT trap (core dumped) $ ===== EXPECTED OUTPUT: $ xlf -qflttrap=invalid:enable -qinitauto=7FBFFFFF -qnooptimize main.f ** main === End of Compilation 1 === 1501-510 Compilation successful for file main.f. $ ./a.out 10.00000000 $
Local fix
Within the test case, replace: print *, maxval(tmparray, mask = (/.false., .true./)) with print *, maxval(pack(tmparray, mask = (/.false., .true./)))
Problem summary
PROBLEM DESCRIPTION: The compiler is not generating a short circuiting AND on the user supplied MASK when expanding these intrinsics. This causes all portions of the expression determining the MAXVAL or MINVAL to be evaluated whether the user requested it or not. When this particular test case is run with these options, the runtime correctly traps on the yscal(1) as the user specified -qinitauto=7FBFFFFF (NaN). USERS AFFECTED: Users that debug using -qinitauto=7FBFFFFF -qflttrap=invalid:enable
Problem conclusion
The fix included generating a short circuiting AND on the user specified MASK, which stops the remainder of the expression from being evaluated.
Temporary fix
Comments
APAR Information
APAR number
IV02380
Reported component name
XL FORTRAN FOR
Reported component ID
5724X1500
Reported release
D10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2011-06-24
Closed date
2011-11-02
Last modified date
2011-11-03
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
LI76467 LI76473 IV10112
Fix information
Fixed component name
XL FORTRAN FOR
Fixed component ID
5724X1500
Applicable component levels
RD10 PSY U848520
UP A
Document Information
Modified date:
03 November 2011