Fixes are available
March 2011 PTF for XL Fortran for AIX, V13.1
August 2011 PTF for XL Fortran for AIX, V13.1
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
The following small test case demonstates that the xlf compiler have a bug in the evaluation of logical expressions: ... integer*4 x/1/, y/2000/ ... ((.not.((x.eq.1).and.(y.lt.1000))).and.(1.eq.x)) evaluates to true .not.((.not.((x.eq.1).and.(y.lt.1000))).and.(1.eq.x)) also comes out true. This issue affects XLF V12.1 and XLF V13.1. ===== TESTCASE: $cat test_case.f program IBM BROKEN FORTRAN integer*4 x/1/, y/2000/ c THIS EXPRESSION SHOULD EVALUATE TO TRUE write (*,*)' ((.not.((x.eq.1).and.(y.lt.1000))).and.(1.eq.x))' + , ((.not.((x.eq.1).and.(y.lt.1000))).and.(1.eq.x)) if (((.not.((x.eq.1).and.(y.lt.1000))).and.(1.eq.x))) then write (*,*) '-OK-: EVALUATES TO TRUE' end if c THIS EXPRESSION SHOULD EVALUATE TO FALSE write (*,*)'.not.((.not.((x.eq.1).and.(y.lt.1000))).and.(1.eq.x))' + , .not.((.not.((x.eq.1).and.(y.lt.1000))).and.(1.eq.x)) c ON IBM, IT ERRONEOUSLY EVALUATES TO TRUE if (.not.((.not.((x.eq.1).and.(y.lt.1000))).and.(1.eq.x))) then write (*,*) '*ERROR*: EVALUATES TO TRUE' else write (*,*) '-OK-: EVALUATES TO FALSE' end if end ===== COMPILE COMMAND: xlf test_case.f $./a.out ((.not.((x.eq.1).and.(y.lt.1000))).and.(1.eq.x)) T -OK-: EVALUATES TO TRUE .not.((.not.((x.eq.1).and.(y.lt.1000))).and.(1.eq.x)) T *ERROR*: EVALUATES TO TRUE
Local fix
N/A
Problem summary
PROBLEM DESCRIPTION: Certain combinations of negated short-circuit expressions were evaluated incorrectly. USERS AFFECTED: Users that depend on short-circuit evaluation.
Problem conclusion
Problem is fixed in the short-circuit expression generator. Apply recommended PTF.
Temporary fix
Comments
APAR Information
APAR number
IZ96368
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-03-08
Closed date
2011-03-08
Last modified date
2011-03-08
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
5724X1500
Applicable component levels
RD10 PSN U842152
UP06/09/13 C
Document Information
Modified date:
08 March 2011