Bulletin number: 9 Products affected: D713D Description: Failure to load BLOCK DATA in FORTRAN Component: ilink Date: Fri Feb 2 16:41:12 GMT 1990 ----- There is a bug in the version of ilink which was distributed with the fortran compiler. This was caused by a slight "improvement" which was made to it. It now loads the first module in the list (mainent) unconditionally, and any others if they satisfy an open reference. This is perfectly valid for almost all languages. Except FORTRAN. A BLOCK DATA subprogram has no references to it. The afserver version works because it loads everything. The following three files are those I have used to verify the problem. The PRINT statement should print out the value '123'. Instead it prints out a value over 2 million. File: hello1.bat t4f hello1a t4f hello1b ilink mainent.c4x hello1a.bin hello1b.bin frtl.lib /o hello1.c4x iboot hello1.c4x iserver /sb hello1.b4x File: hello1a.f77 PROGRAM HELLO COMMON /ABC/ IJK PRINT *,'Hello, world ', IJK END File: hello1b.f77 BLOCK DATA COMMON /ABC/ IJK DATA IJK / 123 / END There is a workaround. A dummy entry point must be defined in the same source file as the BLOCK DATA subprogram. This should be called from somewhere within the program, exactly where is not important. Because is an unresolved reference the entire module containing both DUMMY and BLOCK DATA are read in by the linker. Thus end of problem. File: hello2a.f77 PROGRAM HELLO COMMON /ABC/ IJK PRINT *,'Hello, world ', IJK CALL DUMMY() END File: hello2b.f77 SUBROUTINE DUMMY() END BLOCK DATA COMMON /ABC/ IJK DATA IJK / 123 / END This could be very nasty if programs have not been fully tested. Please pass this information on to everyone programming in this version of fortran.