Fortran on X86 : Linker does not find an EQIVALENT in module

Post Reply

Topic author
joukj
Master
Posts: 175
Joined: Thu Aug 27, 2020 5:50 am
Reputation: 0
Status: Offline

Fortran on X86 : Linker does not find an EQIVALENT in module

Post by joukj » Thu Jun 15, 2023 2:37 am

See the following sample. the variable $GLOBAL$RGB is in the module in an equivalent statement, but the linker does not pick it up

Code: Select all

rumba-jj) f90/vers
VSI Fortran X8.5-0002 (GEM 50X2N) for X86 systems
rumba-jj) ty global.f90
module global

  integer( kind = 1 ) :: rgb( 3 )
  character ( len=1 ) :: rgb_ch( 3 )
!
  equivalence ( rgb ,  rgb_ch )
!
end module global
  15-JUN-2023 08:26:32
rumba-jj) ty test.f90
program test
use global
!
  implicit none
!
! reset memory
  rgb = 0
end
  15-JUN-2023 08:26:39
rumba-jj) f90 global
rumba-jj) f90 test
rumba-jj) link test,global
%ILINK-W-NUDFSYMS, 1 undefined symbol:
%ILINK-I-UDFSYM, 	$GLOBAL$RGB 
%ILINK-W-USEUNDEF, undefined symbol $GLOBAL$RGB referenced
	section: $CODE$
	offset: %X0000000000000027
	module: TEST 
	file: $DISK0:[JOUKJ.test]TEST.OBJ;71 
Leaving out the EQUIVALENCE, it links just fine, but then my program will not work.. For the moment I do not have a work-around for this one.


hb
Valued Contributor
Posts: 79
Joined: Mon May 01, 2023 12:11 pm
Reputation: 0
Status: Offline

Re: Fortran on X86 : Linker does not find an EQIVALENT in module

Post by hb » Thu Jun 15, 2023 5:17 am

Which means that there is no symbol $GLOBAL$RGB defined in GLOBAL.OBJ (ANALYZE/OBJECT/SECTION=SYMTAB shows a GLOBAL%RGB, which the linker can't match with the undefined symbol in TEST).

In other words, it's a FORTRAN compiler problem, not (as one might conclude from the subject) a linker problem.


Topic author
joukj
Master
Posts: 175
Joined: Thu Aug 27, 2020 5:50 am
Reputation: 0
Status: Offline

Re: Fortran on X86 : Linker does not find an EQIVALENT in module

Post by joukj » Thu Jun 15, 2023 5:50 am

Sure the GLOBAL%RGB should be there. but the $GLOBAL$RGB is missing (on IA64 I have them both in the obj-file.
Last edited by joukj on Thu Jun 15, 2023 5:51 am, edited 1 time in total.


jreagan
VSI Expert
Master
Posts: 139
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: Fortran on X86 : Linker does not find an EQIVALENT in module

Post by jreagan » Thu Jun 15, 2023 9:55 pm

I'll put it on the list


Topic author
joukj
Master
Posts: 175
Joined: Thu Aug 27, 2020 5:50 am
Reputation: 0
Status: Offline

Re: Fortran on X86 : Linker does not find an EQIVALENT in module

Post by joukj » Thu Nov 16, 2023 2:01 am

Looks like thiis solved in the new Fortran Compiler (X8.5-007)

Thanks

Jouk

Post Reply