On 12/01/2016 02:54 AM, Martin Liška wrote:
As described in the PR, we do couple of shifts of a negative value.
Fixed in the patch
and couple of new unit tests are added.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
Ready to be installed?
Martin
0001-Fix-runtime-error-left-shift-of-negative-value-PR-ip.patch
From 61a6b5e0c973bd77341a1053609c7ad331691a9e Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
Date: Wed, 30 Nov 2016 15:24:48 +0100
Subject: [PATCH] Fix runtime error: left shift of negative value (PR
ipa/78555).
gcc/ChangeLog:
2016-11-30 Martin Liska <mli...@suse.cz>
PR ipa/78555
* sreal.c (sreal::to_int): Make absolute value before shifting.
(sreal::operator/): Likewise.
(sreal_verify_negative_division): New test.
(void sreal_c_tests): Call the new test.
* sreal.h (sreal::normalize_up): Use new SREAL_ABS and
SREAL_SIGN macros.
(sreal::normalize_down): Likewise.
OK.
jeff