From: Cees Wesseling Newsgroups: comp.os.msdos.djgpp Subject: Re: -O2, FPU error, I am confused Date: Wed, 18 Sep 1996 11:32:44 +0100 Organization: Utrecht University Lines: 22 Message-ID: <323FCFCC.6BC81714@frw.ruu.nl> References: <323D96D7 DOT 5DA0 AT lem DOT ch DOT unito DOT it> <323E757F DOT 73B58D0 AT frw DOT ruu DOT nl> NNTP-Posting-Host: holycow.frw.ruu.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I recieved a numnber of E-mails pointing me to fixed version of libm.a to solve the problem Carlo mentioned and I recognized. > Carlo Nervi wrote: > > > > my program works fine under djgpp v1.12, but exit with SIGFPE > > exception under djgpp v2.00. Using fsdb something strange happen: > > sometimes it exit with a Underflow exception, but sometime else > > running under fsdb the program runs, but with wrong numeric results. > > > > Finally I was able to catch the problem: by using -O2 or -O3 > > optimization switches the problem persist, whereas by using -O In my naive view, I think: Hey the function that crashes on me does not use any of the math-functions. It is just a lot of +,-,/ and * . Is it possible then that the FPU stack is already messed when entering the function? Or does even +,-, etc. implies library calls? -- Cees Wesseling | PO BOX 80.115 | Dept. of Physical Geography | 3508 TC Utrecht | phone: (+31) 30 2532768 Utrecht University | the Netherlands | fax: (+31) 30 2540604