delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/21/18:49:54

Message-ID: <33F8CE9D.1B83@binghamton.edu>
Date: Mon, 18 Aug 1997 15:37:17 -0700
From: Bob Kematick <kmatick AT binghamton DOT edu>
Reply-To: kmatick AT binghamton DOT edu
Organization: Binghamton University
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: djgpp vs lahey fortran
References: <Pine DOT SUN DOT 3 DOT 91 DOT 970810174550 DOT 4651T-100000 AT is> <33EECB6E DOT 31471B8F AT dong DOT snu DOT ac DOT kr>
NNTP-Posting-Host: 128.226.108.228
Lines: 61
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Lee, Sung-Tae wrote:
> 
> 
>    Error message follows:
> 
> Exiting due to signal SIGFPE
> Floating Point exception at eip=0000718f
> eax=000505a3 ebx=ffd67404 ecx=0000001c edx=ffd65404 esi=00056934
> edi=000169d0
> ebp=0005689c esp=00056830 program=E:\SUNG-TAE\¼ö¾÷\ÇÁ·Î±×·¥\FVM.EXE
> cs: sel=00af  base=842a3000  limit=ffd79fff
> ds: sel=00b7  base=842a3000  limit=ffd79fff
> es: sel=00b7  base=842a3000  limit=ffd79fff
> fs: sel=0087  base=00011250  limit=0000ffff
> gs: sel=00c7  base=00000000  limit=ffffffff
> ss: sel=00b7  base=842a3000  limit=ffd79fff
> 
> Call frame traceback EIPs:
>   0x0000718f
>   0x00002478
>   0x00001c62
>   0x0000a7da
> 
> Umm. I don't know what this means...
> I use platform Win95 on Pentimum133(16M).


It is almost certainly a bug with your fotran code. It appears that an
invalid 
floating point number was used in an arithmetic calculation.

Am I correct in assuming that this program ran ok under Lahey fortran,
but fails
to execute when compiled with g77 ?  I really think you should be
looking for 
uninitialized or volatile variables. Problems of this sort often creep
up when moving
fortran code from one compiler to another. Some compilers will
initialize local
variables to zero, g77 does not do so by default.

Try the -finit-local-zero and -fno-automatic options with g77.  Or
compile with
f2c+gcc , which seems to place local variables in static storage by
default.

Also , try to get a copy of the "ftnchek" program , and use it to
analyze your 
source code, looking for uninitialized variables, volatile common blocks
, argument
type / number mismatches , etc.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019