This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30689] equivalence modifies common block
- From: "milan at cmm dot ki dot si" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Feb 2007 00:13:31 -0000
- Subject: [Bug fortran/30689] equivalence modifies common block
- References: <bug-30689-3791@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from milan at cmm dot ki dot si 2007-02-04 00:13 -------
OK, maybe gfortran is right. It doesn't make much sense to me, but this is what
I found from wikipedia links in its fortran entry:
"Variables and arrays in common blocks can appear in EQUIVALENCE statements but
this has the effect of bringing all the associated items into the block. They
can be used to extend the contents of the block upwards, subject to the rules
for common block length, but not downwards."
So it seems that equivalence can change the size of common block :-(
In the next statement it also says that equivalence is mainly used to brake the
rules of fortran :-? So I am basically willing to give up on this and never
touch any equivalence stuff in the future :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30689