Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: khb@chiba.Sun.COM (Keith Bierman - SPD Advanced Languages)
Subject: Re: Fortran bug?
Date: 1 Dec 89 07:39:12 GMT	[thread overview]
Message-ID: <128675@sun.Eng.Sun.COM> (raw)
In-Reply-To: 7120@pt.cs.cmu.edu

In article <7120@pt.cs.cmu.edu> epperly@osnome.che.wisc.edu (Tom Epperly) writes:
>The following short fortran program gives a
>Fatal error in: /usr/lib/fcom1.31 Segmentation fault
>Nice error message!  I really don't know fortran, so I am not sure if this
>is a bug in the compiler or not.  Line seven is the line which causes the
>compiler to die(the one with the MOD).
>
>	PROGRAM test
>	IMPLICIT none
>	INTEGER level, igr
>	igr = 1
>	level = 2
>	igr = MOD(level,INT(10.0))
>	END
>
>Lastly, I am posting this for one of the users on our system; and I don't know
>why he wrote the MOD that way.
>

Runs fine on a sun4 with f77v1.3. The code is legal.


I assume this is a contrived example (cut down from something large no
doubt), as there is no file written (screen output) or anything else
to get a handle on ... so the compiler may try to optimize the whole
program away (default on 1.31 is -O1, if memory serves ... so you
might try -O0 for grins).

On a MIPS box with the current MIPS compilers the correct result is
also provided. Either this was a bug in the MIPS 1.31 compiler (which
DEC is still selling) or it was introduced as part of the the "port".

I'm afraid I don't have a DS3100 handy, so I can't provide a better
explaination nor a tested workaround.


Cheers
Keith H. Bierman    |*My thoughts are my own. !! kbierman@sun.com
It's Not My Fault   |	MTS --Only my work belongs to Sun* 
I Voted for Bill &  | Advanced Languages/Floating Point Group            
Opus                | "When the going gets Weird .. the Weird turn PRO"


  reply	other threads:[~1989-12-01  7:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1989-11-28 16:10 Fortran bug? Thomas Epperly
1989-12-01  7:39 ` Keith Bierman - SPD Advanced Languages [this message]
1989-12-05 17:16   ` Michael Carter 1639503
1989-12-05  2:09 ` Carl Burch
1989-12-07  4:11 ` Lilian Leung
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