This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bug with g77 and -mieee on Alpha Linux
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: Bug with g77 and -mieee on Alpha Linux
- From: Richard Hadsell <hadsell at blueskystudios dot com>
- Date: Thu, 08 Jul 1999 16:08:07 -0400
- CC: craig at jcb-sc dot com, egcs at egcs dot cygnus dot com
- Organization: Blue Sky Studios
- References: <199907062042.WAA00509@keksy.linux.provi.de> <19990707140435.1429.qmail@deer> <19990707194012.A291@keksy.linux.provi.de> <3783B4B1.89DC2124@moene.indiv.nluug.nl> <19990708135500.12573.qmail@deer> <3784BE26.D14F95CD@blueskystudios.com> <19990708155845.13652.qmail@deer> <19990708111645.A6051@cygnus.com>
Richard Henderson wrote:
>
> Underflow to zero always ocurrs when software completion (ie -mieee)
> is not requested. This is still useful for when you need -mieee to
> handle Inf and NaN, but don't care about denormals.
The problem I ran into immediately (with C++) was a call to a math
function (e.g., exp()) that returns a denormal. libm must have been
compiled with -mieee, or its equivalent. When my code is compiled the
default way, without -mieee, the denormal eventually causes a
floating-point exception that crashes my program. Yes, it forced me to
discover and start using -mieee, but the default compilation linked with
the standard libm does not execute gracefully.
Contributors to this list like to blame the programmer for incorrect
code. I think someone should reconsider the interaction between the
compiled code and the libm functions. If that means that functions like
exp() should return 0 instead of denormals, it's fine with me. If
setting a hardware register to force denormals to 0 will have the same
effect, that's also fine.
Just provide a reasonable way to use the compiler and the math functions
in a reliable way. At the moment, that's not the default.
--
Dick Hadsell 914-381-8400 x5446 Fax: 914-381-9790
Reply-to: hadsell@blueskystudios.com
Blue Sky Studios http://www.blueskystudios.com
1 South Road, Harrison, NY 10528