Message-ID: <33F8CE9D.1B83@binghamton.edu> Date: Mon, 18 Aug 1997 15:37:17 -0700 From: Bob Kematick 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: <33EECB6E DOT 31471B8F AT dong DOT snu DOT ac DOT kr> Content-Type: text/plain; charset=iso-8859-1 NNTP-Posting-Host: 128.226.108.228 Lines: 61 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit Precedence: bulk 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.