This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/37581] IEEE inexact-flag not working on the Alpha
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jan 2009 08:47:11 -0000
- Subject: [Bug target/37581] IEEE inexact-flag not working on the Alpha
- References: <bug-37581-1710@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from ubizjak at gmail dot com 2009-01-23 08:47 -------
Works for me with:
--cut here--
#define _GNU_SOURCE
#include <fenv.h>
#include <signal.h>
#include <stdlib.h>
static void foo (int sig)
{
exit (0);
}
float __attribute__((noinline)) test (float x) { return 2.0f / x; };
int main()
{
volatile float x;
signal (SIGFPE, foo);
feclearexcept (FE_ALL_EXCEPT);
feenableexcept (FE_INEXACT);
x = test (3.0f);
abort ();
}
--cut here--
$ gcc -O2 -lm -mieee-with-inexact sf.c
$ ./a.out
$
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37581