tree.c (recompute_tree_invariant_for_addr_expr): Assert that the argument is an ADDR_...
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 16 Oct 2015 10:52:46 +0000 (10:52 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 16 Oct 2015 10:52:46 +0000 (10:52 +0000)
* tree.c (recompute_tree_invariant_for_addr_expr): Assert that the
argument is an ADDR_EXPR.

From-SVN: r228870

gcc/ChangeLog
gcc/tree.c

index 99ce129..aff6fe5 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-16  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * tree.c (recompute_tree_invariant_for_addr_expr): Assert that the
+       argument is an ADDR_EXPR.
+
 2015-10-16  Richard Biener  <rguenther@suse.de>
 
        * gimple-fold.c (gimple_fold_builtin_memory_op): Use gimple_build
index 905c60e..9d0e9de 100644 (file)
@@ -4248,6 +4248,8 @@ recompute_tree_invariant_for_addr_expr (tree t)
   tree node;
   bool tc = true, se = false;
 
+  gcc_assert (TREE_CODE (t) == ADDR_EXPR);
+
   /* We started out assuming this address is both invariant and constant, but
      does not have side effects.  Now go down any handled components and see if
      any of them involve offsets that are either non-constant or non-invariant.