diff options
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 062e03c..d5548ff 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -6137,10 +6137,9 @@ check_array_ref (location_t location, tree ref, bool ignore_off_by_one) low_sub = up_sub = TREE_OPERAND (ref, 1); up_bound = array_ref_up_bound (ref); - /* Can not check flexible arrays or zero-length arrays. */ + /* Can not check flexible arrays. */ if (!up_bound - || TREE_CODE (up_bound) != INTEGER_CST - || tree_int_cst_equal (up_bound, integer_minus_one_node)) + || TREE_CODE (up_bound) != INTEGER_CST) return; /* Accesses to trailing arrays via pointers may access storage |