This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

EQUIVALENCE compiling error


Let me apologize in advance for the length of this message. I'm having
a compiling problem that I can't seem to get around and require the
list's assistance. I'm trying to use gfortran to compile some legacy
code that was previously using the Lahey-Fujitsu compiler (lf95). I've
been able to compile and run successfully in both lf95 and ifort, but
gfortran gives me a compilation error:

-----------------------

compiling edcalc.f
edcalc.f:12.72-72:

     use oiae_module
                                                                      12
Error: Inconsistent equivalence rules involving 'ia' at (1) and 'ihe' at (2)
edcalc.f:12.72-72:

     use oiae_module
                                                                      12
Error: Inconsistent equivalence rules involving 'ia' at (1) and 'it' at (2)
edcalc.f:12.72-72:

     use oiae_module
                                                                      12
Error: Inconsistent equivalence rules involving 'ia' at (1) and 'non' at (2)
edcalc.f:12.72-72:

     use oiae_module
                                                                      12
Error: Inconsistent equivalence rules involving 'ia' at (1) and 'igm' at (2)
gmake[2]: *** [CAE/libedit.a(edcalc.o)] Error 1

-----------------------
In the oiae_module (oiae.f) we have
-----------------------

     module oiae_module

     use global_module

     implicit none

     public

     integer(i_knd), dimension(200), save :: ia

     integer(i_knd), save :: iedopt, ipted, nipe,
    &                iknd, izned, nzns,
    &                ixsum, irsum, npos,
    &                nmat, ncons, macro,
    &                idose, igrped, lng,
    &                nigm, iden, igm,
    &                iajed, ihe, non,
    &                nedt, it, iedotf,
    &                iflux1, iprplt, niplne,
    &                njplne, nkplne, igpclp,
    &                masedi

     integer(i_knd), save :: lnggal, ntpls, ipl3d

     equivalence     (ia( 1),iedopt), (ia( 2),ipted ), (ia( 3),nipe  ),
    &                (ia( 4),iknd  ), (ia( 5),izned ), (ia( 6),nzns  ),
    &                (ia( 7),ixsum ), (ia( 8),irsum ), (ia( 9),npos  ),
    &                (ia(10),nmat  ), (ia(11),ncons ), (ia(12),macro ),
    &                (ia(13),idose ), (ia(14),igrped), (ia(15),lng   ),
    &                (ia(16),nigm  ), (ia(17),iden  ), (ia(18),igm   ),
    &                (ia(19),iajed ), (ia(21),ihe   ), (ia(22),non   ),
    &                (ia(23),nedt  ), (ia(24),it    ), (ia(25),iedotf),
    &                (ia(26),iflux1), (ia(27),iprplt), (ia(28),niplne),
    &                (ia(29),njplne), (ia(30),nkplne), (ia(31),igpclp),
    &                (ia(32),masedi)

     equivalence (ia(151),lnggal),(ia(152),ntpls),(ia(153),ipl3d)

     end module oiae_module

-----------------------
This is my gfortran setup:

Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

I was stumped, so I thought I'd ask here and see if anyone has some
insight into the problem with the equivalence statement.
--
Thad Heltemes
Assistant Researcher
Fusion Technology Institute
University of Wisconsin

http://webpages.charter.net/theltemes


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]