Opened 7 years ago

#12018 new Bugs

rounded_arith_opp doesn't work in Release configuration under msvc 14

Reported by: peter.azmanov@… Owned by: Boris Gubenko
Milestone: To Be Determined Component: interval
Version: Boost 1.60.0 Severity: Showstopper
Keywords: Cc:

Description

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.

Attachments (1)

rounded_arith.patch (1.5 KB ) - added by peter.azmanov@… 7 years ago.

Download all attachments as: .zip

Change History (1)

by peter.azmanov@…, 7 years ago

Attachment: rounded_arith.patch added
Note: See TracTickets for help on using tickets.