Subject: [Boost-bugs] [Boost C++ Libraries] #12018: rounded_arith_opp doesn't work in Release configuration under msvc 14
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-02-25 14:37:18
#12018: rounded_arith_opp doesn't work in Release configuration under msvc 14
------------------------------+-------------------------
Reporter: peter.azmanov@⦠| Owner: bgubenko
Type: Bugs | Status: new
Milestone: To Be Determined | Component: interval
Version: Boost 1.60.0 | Severity: Showstopper
Keywords: |
------------------------------+-------------------------
Interval calculations with `rounded_arith_opp` in Release under msvc 14
result in zero-size intervals.
It seems that compiler optimizes too much, e.g. in
{{{
BOOST_UP_NEG(x / (-y));
}}}
it moves minus operation and calculates something like
{{{
BOOST_UP_NEG(-(x / y));
}}}
which returns the same result as
{{{
BOOST_UP(x / y);
}}}
It looks more like compiler bug. Attached patch is a workaround which
solves the issue.
Tested on x64 platform with /fp:strict and /fp:precise under MS Visual
Studio Community 2015 Version 14.0.24720.00 Update 1.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12018> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC