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 middle-end/80341] gcc miscompiles division of signed char


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

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Fri Apr  7 08:20:24 2017
New Revision: 246756

URL: https://gcc.gnu.org/viewcvs?rev=246756&root=gcc&view=rev
Log:
2017-04-07  Richard Biener  <rguenther@suse.de>

        PR middle-end/80341
        * tree.c (get_unwidened): Also handle ! for_type case for
        INTEGER_CSTs.
        * convert.c (do_narrow): Split out from ...
        (convert_to_integer_1): ... here.  Do not pass final truncation
        type to get_unwidened for TRUNC_DIV_EXPR.

        * gcc.dg/torture/pr80341.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr80341.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/convert.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree.c

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