[comp.unix.aix] XLF data initialization of common blocks

jdr@sloth.mlb.semi.harris.com (Jim Ray) (03/06/91)

I'm trying to port some poorly written fortran code to the RIOS box (
IBM RS6000 model 540 ), and ran into a "slight" problem.

It appears that the xlf compiler will not allow me to initialize ( via
the data statement ) a named common block withen a subroutine other
than block data.

At least 6 months ago I talked with someone withen IBM that mentioned
this and stated that this only refers to blank common not named common
blocks.

Since the code ( several hundred thousand lines ) would be practically
impossible to convert -- does ANYONE KNOW OF ANY hidden or not hidden
option that would allow me to do this?  Is it reliable?  Known problems?

Thanks,
-- 
Jim Ray                                Harris Semiconductor
Internet:  jdr@semi.harris.com         PO Box 883   MS 62B-022
Phone:     (407) 729-5059              Melbourne, FL  32901

shair@ux1.cso.uiuc.edu (Bob Shair) (03/09/91)

jdr@sloth.mlb.semi.harris.com (Jim Ray) writes:

>It appears that the xlf compiler will not allow me to initialize ( via
>the data statement ) a named common block withen a subroutine other
>than block data.

One of the relaxations from the FORTRAN standard in xlf Version 2
allows "initialisation of COMMON block variables in ordinary program
modules."

Every FORTRAN user should be aware that xlf V2 is:
  
   Scheduled to ship 3/29/91,
   Free to xlf V1 users who order BEFORE 3/29/91 for delivery ASAP,
   Upgrades after 3/29 will cost:
     Desktop systems... $205
     Deskside systems.. $405
     Rack systems...... $810.

Order now!  This sounds improbable, but I think I have it right
(if not, I'll hear REAL SOON :-) ).


-- 
Bob Shair                          shair@chgvmic1.iinus1.ibm.com
Scientific Computing Specialist    SHAIR@UIUCVMD (bitnet)
IBM Champaign