[Bug middle-end/78416] wrong code for division by (u128)~INT64_MAX at -O0

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 22 10:16:00 GMT 2016


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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Nov 22 10:14:21 2016
New Revision: 242690

URL: https://gcc.gnu.org/viewcvs?rev=242690&root=gcc&view=rev
Log:
        PR middle-end/78416
        * expmed.c (expand_divmod): Use wide_int for computation of
        op1_is_pow2.  Don't set it if op1 is 0.  Formatting fixes.
        Use size <= HOST_BITS_PER_WIDE_INT instead of
        HOST_BITS_PER_WIDE_INT >= size.

        * gcc.dg/torture/pr78416.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr78416.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/expmed.c
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list