[Bug middle-end/61158] negative shift at fold-const.c:12095
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 15 10:01:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61158
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu May 15 10:01:11 2014
New Revision: 210467
URL: http://gcc.gnu.org/viewcvs?rev=210467&root=gcc&view=rev
Log:
PR tree-optimization/61158
* fold-const.c (fold_binary_loc): If X is zero-extended and
shiftc >= prec, make sure zerobits is all ones instead of
invoking undefined behavior.
* gcc.dg/pr61158.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr61158.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list