From: Richard Biener Date: Wed, 28 Nov 2018 10:59:12 +0000 (+0000) Subject: re PR fortran/88229 (ICE tree check: expected integer_cst, have nop_expr in get_len... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=80e6a1edf9f81362dd40b062ebf81ae7592d19d9;p=gcc.git re PR fortran/88229 (ICE tree check: expected integer_cst, have nop_expr in get_len, at tree.h:5608) 2018-11-28 Richard Biener PR tree-optimization/88229 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT is an INTEGER_CST before accessing it so. From-SVN: r266550 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e08f6dd2f4..93b35e87c5c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-11-28 Richard Biener + + PR tree-optimization/88229 + * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT + is an INTEGER_CST before accessing it so. + 2018-11-28 Sam Tebbs * doc/invoke.texi (-mtune=): Remove obsolete CPU names. diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index bd8b91f8b4b..e3eb4b05130 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1446,6 +1446,7 @@ non_rewritable_mem_ref_base (tree ref) return NULL_TREE; /* For integral typed extracts we can use a BIT_FIELD_REF. */ if (DECL_SIZE (decl) + && TREE_CODE (DECL_SIZE_UNIT (decl)) == INTEGER_CST && (known_subrange_p (mem_ref_offset (base), wi::to_poly_offset (TYPE_SIZE_UNIT (TREE_TYPE (base))),