Fixes are available
September 2012 PTF for XL Fortran for AIX, V12.1
February 2011 PTF for XL Fortran for AIX, V12.1
May 2011 PTF for XL Fortran for AIX, V12.1
July 2011 PTF for XL Fortran for AIX, V12.1
October 2011 PTF for XL Fortran for AIX, V12.1
February 2012 PTF for XL Fortran for AIX, V12.1
January 2013 PTF for XL Fortran for AIX, V12.1
XL Fortran for AIX Fix Pack 18 (July 2013) for 12.1
XL Fortran for AIX Fix Pack 19 (October 2013) for 12.1
XL Fortran for AIX Fix Pack 20 (October 2014 PTF) for 12.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
IZ89350
Reported component name
XL FORTRAN AIX
Reported component ID
5724U8200
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2010-11-18
Closed date
2011-01-21
Last modified date
2011-01-24
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 AIX
Fixed component ID
5724U8200
Applicable component levels
[{"Line of Business":{"code":"LOB57","label":"Power"},"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":"12.1"}]
Document Information
Modified date:
24 February 2022