For the following testcase, the call to mpfr_test_init is optimized away
at -O1 and up.  Which is of course bogous(?).

void mpfr_test_init (void);
void mpfr_test_init ()
{
  do { int __cw = (0x037f & (~0x300)) | 0x200; __asm__ ("fldcw %0" : : "m"
(__cw)); } while (0);
}

int
main (void)
{
  mpfr_test_init ();
  return 0;
}

-- 
           Summary: Optimizes away FPU control word store
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i686-pc-linux-gnu


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

Reply via email to