Operating System - HP-UX
1753481 Members
4582 Online
108794 Solutions
New Discussion

F90 - Common block listed in more than one directive

 
JUP
Regular Advisor

F90 - Common block listed in more than one directive

Hi

I am attempting to port code from f90 on a PA-RISC 11.0 to f90 on Itanium 2 running 11.23.

WHen compiling a particular file that has two routines in it the compile fails with the following error:

MK-INFO: Compiling cross.f
/var/tmp/fcpAAAa17946.F
external subroutine CROSS_NEW
external subroutine CROSS_TEL
Error 4210 : At line 221 Common block "noctask" listed in more than one SHARED_CO
MMON directive.
Error 4210 : At line 108 Common block "khctask" listed in more than one SHARED_CO
MMON directive.
Error 4210 : At line 66 Common block "lovtask" listed in more than one SHARED_COM
MON directive.


If I split the file up into two (one file for each subroutine) both files compile ok.

But as I have literally hundreds of source code files, many of which have multiple subroutines in them, I cannot split all of them up to make them all compile.

Although both subroutines have the identical #include files, they are not global, but included only in the scope of each routine.

The line numbers in the error messages refer to the line numbers of the include files.

At line 221 of noctask.inc is:
C$HP$ SHARED_COMMON KEY='nc' /nctask/

At line 108 of khctask.inc is:
C$HP$ SHARED_COMMON KEY='kc' /kctask/

At line 66 of noctask.inc is:
C$HP$ SHARED_COMMON KEY='lo' /lotask/


I am using :

B3909DB B.11.23.08 HP Fortran 90 Compiler and associ
ated products (S800) for HP-UX 11.2x


I'v tried to install a number of patches (although I don't think that is the problem) however the compiler I believe already contains the latest patches.


Finally - everything compile ok on f90 on the PA-RISC. Its only on the Itanium thats causing the problem.

Does anyone have any idea what the problem may be.

See attached sample file: cross.f

The compile flags I'm using are:

f90 -c -Ae -g -O0 +ppu +cpp=yes +save

Thanks in advance
JUP


1 REPLY 1
JUP
Regular Advisor

Re: F90 - Common block listed in more than one directive

Actually for the attached files, the error would be:

Error 4210 : At line 221 Common block "nctask" listed in more than one SHARED_COMMON directive.
Error 4210 : At line 108 Common block "kctask" listed in more than one SHARED_COMMON directive.
Error 4210 : At line 66 Common block "lotask" listed in more SHARED_COMMON directive.


(the common block names have changed)