EQUIVALENCE compiling error
Tobias Burnus
burnus@net-b.de
Fri Aug 22 16:28:00 GMT 2008
Hi Thad,
Thad Heltemes wrote:
> gfortran gives me a compilation error
> [...] 12
> Error: Inconsistent equivalence rules involving 'ia' at (1) and 'ihe' at (2)
>
> In the oiae_module (oiae.f) we have [...]
>
Your example is either too incomplete or it is fixed in the slighlty
newer gcc version 4.1.3 20080612. Updating gfortran to 4.2.x or 4.3.x
(or maybe even to the developer release 4.4) is recommended in either case.
Can you either create a complete example (all needed files, the shorter
the better) or update to a newer gfortran version (either by installing
e.g. a newer Debian package, e.g. from Lenny or e.g. by downloading one
of the nightlies at http://gcc.gnu.org/wiki/GFortranBinaries).
I tried the following program and it worked with gfortran 4.1.3 to
gfortran 4.4.0
Otherwise, I cannot find any EQUIVALENCE-related bug report in Bugzilla
- either there is no bug or you are the first one who encounted (and
reported it).
Tobias
My test program:
module oiae_module
! use global_module
implicit none
integer, parameter :: i_knd = 4
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
use oiae_module
end
More information about the Fortran
mailing list