[Bug fortran/30689] equivalence modifies common block

milan at cmm dot ki dot si gcc-bugzilla@gcc.gnu.org
Sat Feb 3 23:52:00 GMT 2007



------- Comment #3 from milan at cmm dot ki dot si  2007-02-03 23:52 -------
I am sorry for misunderstanding the program. I just took out of something big,
to show some weird behavior of COMMON and EQUIVALENCE. As you can imagine
-fdefault-integer-8 trick is the only solution to make those old 1 million line
of f77 code work in 64 bit machines. -fdefault-real-8 is not very good idea to
compile gaussian03. I don't want to change too much in this program, but I do
like gfortran for its speed over PGF. The weird behavior comes out if you
delete the equivalence line, then everything is OK. So with the equivalence
statement the COMMON block structure changes. And the program I put in the PR
is showing just this. Of course it doesn't do anything useful, but you don't
want to see the whole thing. I already fixed the stuff in gaussian program and
it works OK now, but I still think there is something strange going on in the
compiler to show this things or maybe I don't understand everything about the
equivalece statement. I am using Jan 19 snapshot and I see the same warnings as
Paul did and this and the wrong value of lenstr tells me that something is not
right. Apparently it works with other compilers (pgf, intel) because there are
a lot of testcases coming with gaussian03 package which would fail with this
code not working.

Is it right that any equivalence statement can change the lenght of a common
block?


-- 

milan at cmm dot ki dot si changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30689



More information about the Gcc-bugs mailing list