------- Comment #3 from rguenth at gcc dot gnu dot org  2007-11-22 19:34 -------
Indeed.  EXPR_LOCUS no longer is NULL if there is no location, but one has
to use EXPR_HAS_LOCATION instead.  Like

Index: tree-vrp.c
===================================================================
--- tree-vrp.c  (revision 130323)
+++ tree-vrp.c  (working copy)
@@ -4492,8 +4492,9 @@ check_all_array_refs (void)
          continue;
       }
       for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si))
-       walk_tree (bsi_stmt_ptr (si), check_array_bounds,
-                  bsi_stmt (si), NULL);
+        if (expr_has_location (bsi_stmt (si)))
+         walk_tree (bsi_stmt_ptr (si), check_array_bounds,
+                    bsi_stmt (si), NULL);
     }
 }


which gets rid of the warning.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mueller at kde dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34197

Reply via email to