delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/15/06:27:19

Date: Wed, 15 May 1996 13:21:49 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Wolfram Brenig <brenig AT thp DOT Uni-Koeln DOT DE>
Cc: djgpp AT delorie DOT com
Subject: Re: V2.x and -On
In-Reply-To: <199605150619.AA00859@sun17.thp.Uni-Koeln.DE>
Message-Id: <Pine.SUN.3.91.960515131521.2701C-100000@is>
Mime-Version: 1.0

On Wed, 15 May 1996, Wolfram Brenig wrote:

> So once again I have to bug you friendly DJGPP gurus with one
> these problems I experience with V2.x : I am getting unexpected
> SIGFPE's in combination with lengthy algebraic expressions if
> compiled with -On.

You might try calling `_control87' library function at the beginning of
your program and set x87 to not generate exceptions.  If that works, it
might be a quick fix that will allow the program to run.  You can then
examine its results instead of staring at the stack dump (which is useless
in this case).  It can even be that you'd get the same answer as in v1.x,
because the exception could happen in an intermediate results that aren't
important for the final outcome. 

I don't know why under v1.x the same program worked.  One possible reason
might be a different compiler version.  Also, DJGPP v2.0 disables the
strength-reduce optimization (due to a known bug in the optimizer) which
was enabled in v1.x.  Try to enable it (by editing the lib/specs file) and
see if that helps. 

- Raw text -


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