Author: das Date: Mon Dec 6 00:19:56 2010 New Revision: 216223 URL: http://svn.freebsd.org/changeset/base/216223
Log: Work around gcc constant folding bugs. Modified: head/tools/regression/lib/msun/test-lrint.c Modified: head/tools/regression/lib/msun/test-lrint.c ============================================================================== --- head/tools/regression/lib/msun/test-lrint.c Mon Dec 6 00:02:49 2010 (r216222) +++ head/tools/regression/lib/msun/test-lrint.c Mon Dec 6 00:19:56 2010 (r216223) @@ -41,9 +41,14 @@ __FBSDID("$FreeBSD$"); #include <ieeefp.h> #endif +/* + * XXX The volatile here is to avoid gcc's bogus constant folding and work + * around the lack of support for the FENV_ACCESS pragma. + */ #define test(func, x, result, excepts) do { \ + volatile double _d = x; \ assert(feclearexcept(FE_ALL_EXCEPT) == 0); \ - assert((func)(x) == (result) || fetestexcept(FE_INVALID)); \ + assert((func)(_d) == (result) || fetestexcept(FE_INVALID)); \ assert(fetestexcept(FE_ALL_EXCEPT) == (excepts)); \ } while (0) _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"