This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/32302] [4.2/4.3 Regression] Incorrect result with -O2



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]