re PR middle-end/34197 (array overflow warning without line number)
2007-11-23 Dirk Mueller <dmueller@suse.de> Richard Guenther <rguenther@suse.de> PR middle-end/34197 * tree-vrp.c (check_array_ref): Move check for valid location.. (check_array_bounds) here. Use EXPR_HAS_LOCATION(). Co-Authored-By: Richard Guenther <rguenther@suse.de> From-SVN: r130385
This commit is contained in:
parent
b96817da11
commit
88df9da158
|
@ -1,3 +1,10 @@
|
|||
2007-11-23 Dirk Mueller <dmueller@suse.de>
|
||||
Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/34197
|
||||
* tree-vrp.c (check_array_ref): Move check for valid location..
|
||||
(check_array_bounds) here. Use EXPR_HAS_LOCATION().
|
||||
|
||||
2007-11-23 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
* reload.c (find_reloads_address_1) <autoincdec cases>:
|
||||
|
|
|
@ -4339,7 +4339,7 @@ check_array_ref (tree ref, location_t* locus, bool ignore_off_by_one)
|
|||
|
||||
low_sub = up_sub = TREE_OPERAND (ref, 1);
|
||||
|
||||
if (!up_bound || !locus || TREE_NO_WARNING (ref)
|
||||
if (!up_bound || TREE_NO_WARNING (ref)
|
||||
|| TREE_CODE (up_bound) != INTEGER_CST
|
||||
/* Can not check flexible arrays. */
|
||||
|| (TYPE_SIZE (TREE_TYPE (ref)) == NULL_TREE
|
||||
|
@ -4441,6 +4441,12 @@ check_array_bounds (tree *tp, int *walk_subtree, void *data)
|
|||
tree stmt = (tree)data;
|
||||
location_t *location = EXPR_LOCUS (stmt);
|
||||
|
||||
if (!EXPR_HAS_LOCATION (stmt))
|
||||
{
|
||||
*walk_subtree = FALSE;
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
*walk_subtree = TRUE;
|
||||
|
||||
if (TREE_CODE (t) == ARRAY_REF)
|
||||
|
|
Loading…
Reference in New Issue