This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/80341] gcc miscompiles division of signed char
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 07 Apr 2017 08:20:56 +0000
- Subject: [Bug middle-end/80341] gcc miscompiles division of signed char
- Auto-submitted: auto-generated
- References: <bug-80341-4@http.gcc.gnu.org/bugzilla/>
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