]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle gimple statement...
authorJeff Law <law@redhat.com>
Fri, 27 Oct 2017 15:35:37 +0000 (09:35 -0600)
committerJeff Law <law@gcc.gnu.org>
Fri, 27 Oct 2017 15:35:37 +0000 (09:35 -0600)
* 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

gcc/ChangeLog
gcc/tree-vrp.c

index 68d5943e90bfd00ab09813c216b07df9ba821ca9..33e275f6b3c5d4cf6daf43cfc1fa0088bc232976 100644 (file)
@@ -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
index 2c86b8e5c910c5a52916acded39175a576df46c7..98be68467d7b36179fdc10a5f6b93b5df444031a 100644 (file)
@@ -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);