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


I am running gcc version 2.96 20000731 with a g77(or f77) command and
have discovered the following logical disaster: (run the following pgm
with  g77 -o xxxx xxx.f )

c Program xxxx
      a=193.15
       b=0.1
      c=a+b
      if(a+b.ne.c) write(*,100) a,b,c
  100 format(3f20.9)
      stop
      end

The ne if is satisfied and the write proceeds. Apparently, arithmetic
done inside an "if" statement is done to a different precision than that
done outside the "if" statement. If the compile line contains a -O flag
the pgm works O.K. I am moving a few-hundred lines of FORTRAN from UNIX
to LINUX and this is an intolerable inconsistency to deal with. I've
discovered 3 points of impact already but there may, conceivably, be
many more.

Thank you, I really appreciate the efforts you've put into the
development of a very stable platform.

Richard Arndt
arndtra@vt.edu or arndtra@said.phys.vt.edu


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