IBM/Absoft bug on Mac OS-X
From: David Sagan (dcs16_at_cornell.dot.edu)
Date: 03/07/05
- Next message: Steve Lionel: "Re: Copying byte sequence from integer/real to character array"
- Previous message: meek_at_skyway.usask.ca: "RE: Binary i-o in g77"
- Next in thread: Greg Lindahl: "Re: IBM/Absoft bug on Mac OS-X"
- Reply: Greg Lindahl: "Re: IBM/Absoft bug on Mac OS-X"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 07 Mar 2005 10:02:46 -0500
Hello:
I have run across a bug using the IBM and Absoft compilers (the latest
versions) on Mac OS-X (10.3) and I am wondering whether anyone else
knows anything about this. To see the bug consider the following test
files:
!-------------------------------
! This is a file: test_mod.f
module test_mod
type my_struct
integer :: iii = 27
endtype
type (my_struct), save :: my
contains
subroutine test_in_mod
print *, 'In Module:', my%iii
end subroutine
end module
!-------------------------------
!-------------------------------
! This is a file: test.f
program test
use test_mod
implicit none
print *, 'In Main:', my%iii
! call test_in_mod
end program
!-------------------------------
The bug appears when test_mod.f is put in a library and test.f is linked
against it:
mc66:~/Bmad/bmad_dist/bug_lib_ibm> xlf90 -c test_mod.f
** test_mod === End of Compilation 1 ===
1501-510 Compilation successful for file test_mod.f.
mc66:~/Bmad/bmad_dist/bug_lib_ibm> ar -r libtest_mod.a test_mod.o
mc66:~/Bmad/bmad_dist/bug_lib_ibm> ranlib libtest_mod.a
mc66:~/Bmad/bmad_dist/bug_lib_ibm> xlf90 test.f -L. -ltest_mod
** test === End of Compilation 1 ===
1501-510 Compilation successful for file test.f.
mc66:~/Bmad/bmad_dist/bug_lib_ibm> ./a.out
In Main: 0
This is wrong. Uncommenting out the "call test_in_mod" makes the program
produce the correct result. Someone in my lab suspects that it is due to
the ld loader. Anyone have any information on this?
-- Thanks, David
- Next message: Steve Lionel: "Re: Copying byte sequence from integer/real to character array"
- Previous message: meek_at_skyway.usask.ca: "RE: Binary i-o in g77"
- Next in thread: Greg Lindahl: "Re: IBM/Absoft bug on Mac OS-X"
- Reply: Greg Lindahl: "Re: IBM/Absoft bug on Mac OS-X"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|