aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2017-10-27 09:35:37 -0600
committerJeff Law <law@gcc.gnu.org>2017-10-27 09:35:37 -0600
commita565d95cd0f0ce7b7c44cfd86ea5abfe4fcba1b7 (patch)
tree6b16bb412efdbcb1bdc71888bdb086b7a64b68e9
parentf44d7b243a43db45cedc52ea3bd3f385b8f06f0d (diff)
downloadgcc-a565d95cd0f0ce7b7c44cfd86ea5abfe4fcba1b7.zip
gcc-a565d95cd0f0ce7b7c44cfd86ea5abfe4fcba1b7.tar.gz
gcc-a565d95cd0f0ce7b7c44cfd86ea5abfe4fcba1b7.tar.bz2
tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle gimple statement locations.
* tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle gimple statement locations. (check_array_bounds): Corresponding changes. Get the statement's location directly from wi->stmt. From-SVN: r254154
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-vrp.c8
2 files changed, 8 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 68d5943..33e275f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2017-10-27 Jeff Law <law@redhat.com>
+
+ * tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle
+ gimple statement locations.
+ (check_array_bounds): Corresponding changes. Get the statement's
+ location directly from wi->stmt.
+
2017-10-27 Palmer Dabbelt <palmer@dabbelt.com>
PR target/82717
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 2c86b8e..98be684 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -6837,10 +6837,7 @@ check_array_bounds (tree *tp, int *walk_subtree, void *data)
if (EXPR_HAS_LOCATION (t))
location = EXPR_LOCATION (t);
else
- {
- location_t *locp = (location_t *) wi->info;
- location = *locp;
- }
+ location = gimple_location (wi->stmt);
*walk_subtree = TRUE;
@@ -6887,9 +6884,6 @@ check_all_array_refs (void)
memset (&wi, 0, sizeof (wi));
- location_t loc = gimple_location (stmt);
- wi.info = &loc;
-
walk_gimple_op (gsi_stmt (si),
check_array_bounds,
&wi);