This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jun 2007 09:30:50 -0000
- Subject: [Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2
- References: <bug-32302-10129@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from pault at gcc dot gnu dot org 2007-06-13 09:30 -------
The problem lies with the common block aux32, which is declared in subroutine
unpki with 6 integer(4) arrays at the beginning and, elsewhere, is declared
with default reals. Apparently, this makes a mess of the laying up of the
common block with any level of optimization.
There are three workarounds:
(i) With -DPP, use -fdefault-integer-8
(ii) Put subroutine unpki later in the source file
(iii) Change to
subroutine unpki(ixp,nwcon,nmel)
#ifdef DP
implicit double precision (a-h,o-z) dp
implicit integer(8) (i-n)
#endif
parameter(lnv=VECLEN)
c
c unpack connection data
c
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32302