public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/30568]  New: -ftrapping-math should prevent folding/dead code stripping of some builtins
@ 2007-01-24  2:10 geoffk at gcc dot gnu dot org
  2007-01-24  2:11 ` [Bug middle-end/30568] " geoffk at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2007-01-24  2:10 UTC (permalink / raw)
  To: gcc-bugs

This program:

#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);
}

when compiled with -ftrapping-math, should show that some flags are set,
FE_INVALID I think (maybe others).  Instead it shows that no flags are set,
because GCC has completely folded out the call to acos().


-- 
           Summary: -ftrapping-math should prevent folding/dead code
                    stripping of some builtins
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: geoffk at gcc dot gnu dot org
GCC target triplet: *-*-darwin*


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-29 21:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-24  2:10 [Bug middle-end/30568] New: -ftrapping-math should prevent folding/dead code stripping of some builtins geoffk at gcc dot gnu dot org
2007-01-24  2:11 ` [Bug middle-end/30568] " geoffk at gcc dot gnu dot org
2007-01-24  2:37 ` joseph at codesourcery dot com
2007-01-24  6:54 ` pinskia at gcc dot gnu dot org
2007-01-24 10:25 ` rguenth at gcc dot gnu dot org
2009-02-15 20:09 ` kreckel at ginac dot de
2009-12-29 21:51 ` fxcoudert at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).