[comp.lang.fortran] SUN f77 v 1.3.1

monk@cassandra.monk.udel.edu (Peter Monk) (12/20/90)

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     *
                                         ***************************
------------------------------------------------------------

khb@chiba.Eng.Sun.COM (Keith Bierman fpgroup) (12/20/90)

In article <39591@nigel.ee.udel.edu> monk@cassandra.monk.udel.edu (Peter Monk) writes:

....sad saga

   The problem seems to be in the compiler not the loader.  ....

Actually, the most likely culprit was a nasty little bug in the OS,
specifically in the tmpfs code. The typical options are:

	1)  don't use tmpfs 

	2)  procure and install 100174-01 (4.1.1 only; other
	    patch numbers for other releases, chat with 
	    your support folks for details)

Using tmpfs has sped up some of my work by nearly 2x (wallclock time),
so getting the patch is probably the better solution in general.

One would have hoped that users would use the vendor provided support
structures .... newsgroups should be preserved for debating important
things ... like "when is modula3 going to completely displace Fortran"
and the like. ;>
--
----------------------------------------------------------------
Keith H. Bierman    kbierman@Eng.Sun.COM | khb@chiba.Eng.Sun.COM
SMI 2550 Garcia 12-33			 | (415 336 2648)   
    Mountain View, CA 94043