Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Stefan Rombouts <stefan.rombouts@rug.ac.be>
Subject: bug in Digital Fortran 77 V4.0 for UNIX Alpha Systems (-transform_loops)
Date: 1997/03/11	[thread overview]
Message-ID: <3325D9A3.41C6@rug.ac.be> (raw)


There is a bug in the Digital Fortran 77 compiler V4.0 for UNIX Alpha
Systems: the following program does goes wrong if it is compiled with
the optimalization option -transform_loops (and thus also with -O5):


      PROGRAM fortranbug
C     bug in the fortran compiler 
C     compilation  with -O5 gives a different result than -O4
      REAL X(8,8)
      T1=9.
      X(6,1)=0.0
      T2=1.
      T3=2.
      DO K=2,5
         T4=T2+T3
         T5=T2*T3
         T6=SQRT(T2**2+T1)
         X(1,K)=T1
         X(2,K)=T2
         X(3,K)=T3
         T7=T2*SQRT(T3**2+T1)
         X(4,K)=T7
         X(5,K)=T3
         X(6,K)=X(6,k-1)+T7
         T2=T2+1.
         T3=T3+1.
      ENDDO
      WRITE(6,*) 'result:',X(6,5)
      DO I=2,5
         WRITE(6,'(5F12.6)') (X(J,I),J=1,5)
      ENDDO
      END  
	   
   /o\ |+\     Stefan Rombouts          		                  
   \_  | /     Institute for nuclear sciences   Tel. +32 (0)9/264 65 41  
     \ |\      RUG - Universiteit Gent          Fax. +32 (0)9/264 66 99 
   \_/ | \     Proeftuinstraat 86 ; B-9000 Gent ; Belgium



             reply	other threads:[~1997-03-11  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-11  5:00 Stefan Rombouts [this message]
1997-03-17  5:00 ` bug in Digital Fortran 77 V4.0 for UNIX Alpha Systems (-transform_loops) Steve Lionel
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox