This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/30568] -ftrapping-math should prevent folding/dead code stripping of some builtins



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2009-12-29 21:51 -------
Confirming this as generic, non Darwin-specific bug. On i686-linux with current
trunk:

$ cat a.c
#include <stdio.h>
#include <math.h>
#include <fenv.h>

main()
{
unsigned flags;

feclearexcept(FE_ALL_EXCEPT);
(void)acos(1.1);
flags = fetestexcept(FE_ALL_EXCEPT);

printf("(void)acos( %e ) gives flags 0x%8x\n", 1.1, flags & FE_ALL_EXCEPT);
}
$ gcc a.c -ftrapping-math -O0 -fno-math-errno -lm && ./a.out
(void)acos( 1.100000e+00 ) gives flags 0x       0


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|*-*-darwin*                 |
   Last reconfirmed|2007-01-24 10:25:28         |2009-12-29 21:51:37
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30568


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]