Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!cassandra!monk From: monk@cassandra.monk.udel.edu (Peter Monk) Newsgroups: comp.lang.fortran Subject: SUN f77 v 1.3.1 Message-ID: <39591@nigel.ee.udel.edu> Date: 19 Dec 90 20:00:05 GMT Sender: usenet@ee.udel.edu Reply-To: monk@math.udel.edu Organization: Univ of Delaware, Math Sci Dept Lines: 57 Nntp-Posting-Host: cassandra.math.udel.edu I have a problem with sun fortran v 1.3.1 on my sparc 1 (Os4.1, local disk/data). Here is the code: double precision x1,x2 data x1,x2 /0.0d0,0.1d0/ write(*,*) x1,x2 stop end here is the result: Compile: f77 test.f Run: a.out Result: NaN 1.0000000000000D-01 Another compile: f77 test.f Run again: a.out A different result: 5.0927898983167-313 1.0000000000000D-01 Not quite what I hoped for (sometimes it works fine!). This code works fine on other sun4's with f77v1.3.1. The problem seems to be in the compiler not the loader. Using f77 -S to get an assembler output I get the following fragment defining the variables: v.16: .word 0x40003d08,0xd2006244 .skip 0 .align 8 v.17: .word 0x3fb99999,0x9999999a .skip 0 This should be: v.16: .skip 8 .align 8 v.17: .word 0x3fb99999,0x9999999a .skip 0 HELP! Any suggestions would be gratefully received. --------> Peter Monk *************************** * Dept of Math Sci * * University of Delaware * * monk@math.udel.edu * *************************** ------------------------------------------------------------