Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

check for denormal

148 views
Skip to first unread message

Pascal

unread,
May 12, 2011, 8:11:06 AM5/12/11
to
Hi,

I am compiling a fortran program with gfortran (Debian 4.4.5-8) and
-fpe-trap=denormal

The compilation went fine but when I am running the executable, I have:

Fortran runtime warning: IEEE 'denormal number' exception not supported.

I tried both on 32bit and 64bit OS. What are the prerequisite for this?

Thanks,
Pascal

steve

unread,
May 12, 2011, 11:16:46 AM5/12/11
to

Use a different operating system. :-)

The source code for libgfortran includes this code

/* glibc does never have a FE_DENORMAL. */
if (options.fpe & GFC_FPE_DENORMAL)
#ifdef FE_DENORMAL
feenableexcept (FE_DENORMAL);
#else
st_printf ("Fortran runtime warning: IEEE 'denormal number' "
"exception not supported.\n");
#endif

--
steve


Pascal

unread,
May 13, 2011, 3:56:34 AM5/13/11
to
On 05/12/2011 05:16 PM, steve wrote:
> On May 12, 5:11 am, Pascal<pascal...@parois.net> wrote:
>>
>> The compilation went fine but when I am running the executable, I have:
>>
>> Fortran runtime warning: IEEE 'denormal number' exception not supported.

>>
>


> Use a different operating system. :-)
>
> The source code for libgfortran includes this code
>
> /* glibc does never have a FE_DENORMAL. */

> if (options.fpe& GFC_FPE_DENORMAL)


> #ifdef FE_DENORMAL
> feenableexcept (FE_DENORMAL);
> #else
> st_printf ("Fortran runtime warning: IEEE 'denormal number' "
> "exception not supported.\n");
> #endif
>

Too bad :(

Thanks,
Pascal

Tobias Burnus

unread,
May 13, 2011, 4:26:14 AM5/13/11
to
On May 13, 9:56 am, Pascal <pascal...@parois.net> wrote:
> On 05/12/2011 05:16 PM, steve wrote:
> > On May 12, 5:11 am, Pascal<pascal...@parois.net>  wrote:
>
> >> The compilation went fine but when I am running the executable, I have:
> >> Fortran runtime warning: IEEE 'denormal number' exception not supported.
>
> > The source code for libgfortran includes this code
> > /* glibc does never have a FE_DENORMAL.  */
> >    if (options.fpe&  GFC_FPE_DENORMAL)
> > #ifdef FE_DENORMAL
> >      feenableexcept (FE_DENORMAL);
> > #else
> >      st_printf ("Fortran runtime warning: IEEE 'denormal number' "
> >                 "exception not supported.\n");
> > #endif
>
> Too bad :(

Well, I have not really looked at the code in detail, but presumably
with the patch in the bug report, one can get the desired result:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48977

Tobias

0 new messages