[Boost-bugs] [Boost C++ Libraries] #13160: cpp_dec_float fails division with on MinGW7.1 with optimization -O2

Subject: [Boost-bugs] [Boost C++ Libraries] #13160: cpp_dec_float fails division with on MinGW7.1 with optimization -O2
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-08-13 07:34:17


#13160: cpp_dec_float fails division with on MinGW7.1 with optimization -O2
------------------------------+----------------------------
 Reporter: dwieselwind@… | Owner: John Maddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: multiprecision
  Version: Boost 1.63.0 | Severity: Optimization
 Keywords: |
------------------------------+----------------------------
 When compiling the following on MinGW 7.1 with option -O2, the assertion
 fires.

 It succeeds (as expected) with:
 -O3
 debug (no optimization)
 -m64 (in all configurations)

 {{{
 #include <cassert>
 #include <boost/multiprecision/cpp_dec_float.hpp>

 typedef
 boost::multiprecision::number<boost::multiprecision::cpp_dec_float<50> >
 flp_type;

 int main()
 {
     flp_type v1("1.33");
         flp_type v2(50);
         v1 /= v2;
         assert(v1 == flp_type("0.0266"));

     return 0;
 }

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13160>
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-08-13 07:39:31 UTC