This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
EQUIVALENCE compiling error
- From: "Thad Heltemes" <taheltemes at wisc dot edu>
- To: fortran at gcc dot gnu dot org
- Date: Fri, 22 Aug 2008 10:48:46 -0500
- Subject: EQUIVALENCE compiling error
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:content-transfer-encoding :content-disposition:x-google-sender-auth; bh=d9qP7DtZ3rBuUtIXujdKUrD0A8GSAbARsAJ0IeUMfvE=; b=UBK1vV8/3gVpvNFE5wFoQ3ExVf1o5Sl6zx2mpxf7xxixpQtL1xUHHJfw254HUlND2G 4fGkKL8LBqMnSh2EUSccQgTNJEUkem7+yK//0Y10ZhJ/EGjkd3REeRXEkccTHn5SBTOW ZI5M+vwkHfSbbQ8UhY5ItikdoTjVT4d9vsYrg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; b=v2Y+MWhM9c+jdc3MPJTEe14gRze+ta6J2d4aWQLQ23rd98IoOA3XG7KQhl+tbQZe1m bpXBeT2wet2rZBGN7TOKqeDdQgM3y2Se0gP9y1n3Phy/vfT8hDL55lQ6ZNRcQxFdQIAa DAhK7Pgka3ALP0kBh5mgfY8aP/kHy+U6yWKQA=
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