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 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
LI76093
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:
APAR is sysrouted TO one or more of the following:
024AC6
Fix information
Fixed component name
XL FORTRAN LINU
Fixed component ID
5724X1600
Applicable component levels
RD10 PSN IZ89350
UP06/09/13
[{"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