Commit 5c8cebe7 by Richard Biener Committed by Richard Biener

re PR tree-optimization/84417 (internal compiler error: verify_gimple failed)

2018-02-16  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/84417
	* tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
	the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
	(non_rewritable_lvalue_p): Likewise, use poly-ints.

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

From-SVN: r257731
parent 95df0433
2018-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/84417
* tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
(non_rewritable_lvalue_p): Likewise, use poly-ints.
2018-02-16 Martin Liska <mliska@suse.cz>
PR sanitizer/84307
......
2018-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/84417
* gcc.dg/torture/pr84417.c: New testcase.
2018-02-16 Jakub Jelinek <jakub@redhat.com>
PR target/84272
......
/* { dg-do compile } */
/* { dg-require-effective-target int32plus } */
void fn1()
{
__attribute__((__vector_size__(sizeof(double)))) double x;
double *a = (double *)&x;
*a + *(a + 8446744073709551615LL);
}
......@@ -1434,6 +1434,7 @@ non_rewritable_mem_ref_base (tree ref)
|| TREE_CODE (TREE_TYPE (decl)) == COMPLEX_TYPE)
&& useless_type_conversion_p (TREE_TYPE (base),
TREE_TYPE (TREE_TYPE (decl)))
&& known_ge (mem_ref_offset (base), 0)
&& known_gt (wi::to_poly_offset (TYPE_SIZE_UNIT (TREE_TYPE (decl))),
mem_ref_offset (base))
&& multiple_of_p (sizetype, TREE_OPERAND (base, 1),
......@@ -1516,11 +1517,11 @@ non_rewritable_lvalue_p (tree lhs)
&& TYPE_MODE (TREE_TYPE (decl)) != BLKmode
&& operand_equal_p (TYPE_SIZE_UNIT (TREE_TYPE (lhs)),
TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (decl))), 0)
&& tree_fits_uhwi_p (TREE_OPERAND (lhs, 1))
&& tree_int_cst_lt (TREE_OPERAND (lhs, 1),
TYPE_SIZE_UNIT (TREE_TYPE (decl)))
&& (tree_to_uhwi (TREE_OPERAND (lhs, 1))
% tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (lhs)))) == 0)
&& known_ge (mem_ref_offset (lhs), 0)
&& known_gt (wi::to_poly_offset (TYPE_SIZE_UNIT (TREE_TYPE (decl))),
mem_ref_offset (lhs))
&& multiple_of_p (sizetype, TREE_OPERAND (lhs, 1),
TYPE_SIZE_UNIT (TREE_TYPE (lhs))))
return false;
}
......
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