From c3e46927e4504374677f4e17838e6e51b5d7b185 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 4 May 2017 09:08:01 +0000 Subject: tree.c (array_at_struct_end_p): Handle arrays at struct end with flexarrays more conservatively. 2017-05-04 Richard Biener * tree.c (array_at_struct_end_p): Handle arrays at struct end with flexarrays more conservatively. Refactor and treat arrays of arrays or aggregates more strict. Fix VIEW_CONVERT_EXPR handling. Remove allow_compref argument. * tree.c (array_at_struct_end_p): Adjust prototype. * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust. * gimple-fold.c (get_range_strlen): Likewise. * tree-chkp.c (chkp_may_narrow_to_field): Likewise. From-SVN: r247581 --- gcc/tree-chkp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree-chkp.c') diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c index b1ff218..23f5af9 100644 --- a/gcc/tree-chkp.c +++ b/gcc/tree-chkp.c @@ -3277,7 +3277,7 @@ chkp_may_narrow_to_field (tree ref, tree field) return DECL_SIZE (field) && TREE_CODE (DECL_SIZE (field)) == INTEGER_CST && tree_to_uhwi (DECL_SIZE (field)) != 0 && !(flag_chkp_flexible_struct_trailing_arrays - && array_at_struct_end_p (ref, true)) + && array_at_struct_end_p (ref)) && (!DECL_FIELD_OFFSET (field) || TREE_CODE (DECL_FIELD_OFFSET (field)) == INTEGER_CST) && (!DECL_FIELD_BIT_OFFSET (field) -- cgit v1.1