problem with common blocks in IVF

From: alexander chupeev (someone_at_somewhere.com)
Date: 08/21/04


Date: Sat, 21 Aug 2004 22:55:19 +0600

Hello,

I fall into trouble using common blocks with Intel Fortran 8.0.050_pe053. I
initialize
common block data within block data program unit. When I place this unit in
a static
library, variables are not defined as expected. Simple linking with object
file produce
correct executabe. Is there a patch or workaround for such problem?

-------------- expose_problem.sh ---------------
#/bin/sh
cat > build.cmd << EOF
ifort /nologo /MT /Od /Zi /dbglibs /math_library:check /traceback /c xx.for
lib /nologo /out:xx.lib xx.obj
ifort /nologo /MT /Od /Zi /dbglibs /math_library:check /traceback
/out:good.exe gg.for xx.obj
ifort /nologo /MT /Od /Zi /dbglibs /math_library:check /traceback
/out:wrong.exe gg.for xx.lib
EOF
cat > xx.for << EOF
      block data utilbd
      COMMON /VCTSEQ/ NQ,QX(50),QY(50),NF,IF(25)
      DATA NQ,QX(1),QY(1),NF,IF(1) / 1 , 0. , 0. , 1 , 1 /
      end block data
EOF
cat > gg.for << EOF
      program main
      COMMON /VCTSEQ/ NQ,QX(50),QY(50),NF,IF(25)
      EXTERNAL UTILBD
      print *, nq
      end
EOF



Relevant Pages

  • Re: problem with common blocks in IVF
    ... > I fall into trouble using common blocks with Intel Fortran 8.0.050_pe053. ... > common block data within block data program unit. ...
    (comp.lang.fortran)
  • Re: problem with common blocks in IVF
    ... > I fall into trouble using common blocks with Intel Fortran 8.0.050_pe053. ... > common block data within block data program unit. ...
    (comp.lang.fortran)