From: Michael Stewart (pmstewart_at_lbl.gov)
Date: 07/24/2003
The upgrade of the xlf compiler to 8.1.1.0 that was scheduled for next
Wednesday, July 30 has been cancelled due to a new bug with the len_trim
intrinsic that appeared with this version.
Here is a simple Fortran 77 test code that exhibits the bug.
% cat trimbug.F
program trimbug
! This exhibits a bug in the Fortran len_trim routine
implicit none
character*2 string(2)
integer i
do i=1,2
string(i)=" "
if (i.eq.2) then
print *,"len_trim of blank string=",
1 len_trim(string(i))," (should be 0)"
endif
enddo
end
Compile it like this:
% xlf -o trimbug trimbug.F
With the current seaborg xlf default, 8.0.0.3, len_trim is correct:
% ./trimbug
len_trim of blank string= 0 (should be 0)
When compiled with 8.1.1.0 which is currently in the xlf module, the
routine returns an incorrect result:
% module load xlf
xlf 8.1.1.0 - an newer version of IBM fortran compiler
% xlf -o trimbug trimbug.F
** trimbug === End of Compilation 1 ===
1501-510 Compilation successful for file trimbug.F.
% ./trimbug
len_trim of blank string= -1 (should be 0)
NCAR has reported this problem to IBM, and a fix should be available
soon. The seaborg compiler will not be upgraded until this bug is fixed.
--
Michael Stewart
NERSC Consultant
510-486-6648
pmstewart@lbl.gov
This archive was generated by hypermail 2.1.6 : 08/21/2008 PDT