This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ipa/78555] gcc/sreal.c:232:20: runtime error: left shift of negative value -2018967552


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78555

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
Author: marxin
Date: Fri Dec  2 08:36:01 2016
New Revision: 243163

URL: https://gcc.gnu.org/viewcvs?rev=243163&root=gcc&view=rev
Log:
Fix runtime error: left shift of negative value (PR

        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.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/sreal.c
    trunk/gcc/sreal.h

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]