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]

Optimization bug in current snapshot


Hi,
this shows an optimization error with g77 -O on i686-pc-linux-gnu
(gcc-20001106):

      REAL*8 VALUE(2), TOLD, BK
      DATA VALUE /0D0, 1D0/
      DATA TOLD /0D0/

      DO I=1, 2
         BK = VALUE(I)
         IF(BK .GT. TOLD) GOTO 10
      ENDDO

      WRITE(*,*) 'Error: BK = ', BK
      STOP

 10   WRITE(*,*) 'No Error: BK = ', BK
      END

g77 -o prog prog.f gives 'No Error: BK = 1.'
g77 -O -o prog prog.f gives 'Error: BK = 1.'

Bye, Martin.


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