Commit 3d99332b by Richard Biener Committed by Richard Biener

re PR sanitizer/81505 (ICE in tree-ssa-loop-manip.c:95 with -fsanitize=signed-integer-overflow)

2017-07-25  Richard Biener  <rguenther@suse.de>

	PR middle-end/81505
	* fold-const.c (fold_negate_const): TREE_OVERFLOW should be
	sticky.

	* gcc.dg/ubsan/pr81505.c: New testcase.

From-SVN: r250494
parent 7ad5808d
2017-07-25 Richard Biener <rguenther@suse.de>
PR middle-end/81505
* fold-const.c (fold_negate_const): TREE_OVERFLOW should be
sticky.
2017-07-24 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
......
......@@ -13702,8 +13702,8 @@ fold_negate_const (tree arg0, tree type)
bool overflow;
wide_int val = wi::neg (arg0, &overflow);
t = force_fit_type (type, val, 1,
(overflow | TREE_OVERFLOW (arg0))
&& !TYPE_UNSIGNED (type));
(overflow && ! TYPE_UNSIGNED (type))
|| TREE_OVERFLOW (arg0));
break;
}
......
2017-07-25 Richard Biener <rguenther@suse.de>
PR middle-end/81505
* gcc.dg/ubsan/pr81505.c: New testcase.
2017-07-24 Daniel Santos <daniel.santos@pobox.com>
PR testsuite/80759
......
/* { dg-do compile } */
/* { dg-options "-O3 -fsanitize=signed-integer-overflow" } */
int a, b, c, h;
int i[5][5];
void
fn1 ()
{
int l = 0;
for (a = 0; a <= 3; a++)
for (b = 1; b >= 0; b -= 1)
l |= i[0][b];
c = l;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment