From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,8b0da1e67335927f,start X-Google-Attributes: gidfee84,public From: Stefan Rombouts Subject: bug in Digital Fortran 77 V4.0 for UNIX Alpha Systems (-transform_loops) Date: 1997/03/11 Message-ID: <3325D9A3.41C6@rug.ac.be>#1/1 X-Deja-AN: 225546324 Organization: University of Ghent, Belgium Newsgroups: comp.unix.osf.osf1 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