Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* bug in Digital Fortran 77 V4.0 for UNIX Alpha Systems (-transform_loops)
@ 1997-03-11  5:00 Stefan Rombouts
  1997-03-17  5:00 ` Steve Lionel
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Rombouts @ 1997-03-11  5:00 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-03-17  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-03-11  5:00 bug in Digital Fortran 77 V4.0 for UNIX Alpha Systems (-transform_loops) Stefan Rombouts
1997-03-17  5:00 ` Steve Lionel

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