Skip to content

Commit a749b90

Browse files
committed
Avoid undefined underflow
1 parent 2161950 commit a749b90

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/test_saturating_arith.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,11 @@ void test_sub_sat<boost::int128::int128_t>()
240240
const auto sat_res {sub_sat(near_min, i)};
241241
BOOST_TEST(sat_res == min);
242242

243+
// Signed overflow seems to saturate on ARM graviton
244+
#ifndef __aarch64__
243245
const auto res {near_min - i};
244246
BOOST_TEST(sat_res != res);
247+
#endif
245248
}
246249
}
247250

0 commit comments

Comments
 (0)