cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
authorMarek Polacek <polacek@redhat.com>
Fri, 26 Jun 2015 10:03:35 +0000 (10:03 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 26 Jun 2015 10:03:35 +0000 (10:03 +0000)
* cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
* cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.

From-SVN: r224999

gcc/cp/ChangeLog
gcc/cp/cp-array-notation.c
gcc/cp/cp-ubsan.c

index 5155540df72a8ed12f8fe738ec5bbdc2e794272e..4d8ec3eed002cc60cd651e363f0489b4b8aeaaf9 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-26  Marek Polacek  <polacek@redhat.com>
+
+       * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P.
+       * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise.
+
 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
 
        * call.c: Remove ipa-ref.h and plugin-api.h from include list.
index 3b8610fba97497bbeb0c06cfc5bba3fe5d925e59..9b8034ec8e2fc02c2bed856e0be24da2cd4c5ec8 100644 (file)
@@ -345,7 +345,7 @@ expand_sec_reduce_builtin (tree an_builtin_fn, tree *new_var)
     array_ind_value = get_temp_regvar (TREE_TYPE (func_parm), func_parm);
 
   array_op0 = (*array_operand)[0];
-  if (TREE_CODE (array_op0) == INDIRECT_REF)
+  if (INDIRECT_REF_P (array_op0))
     array_op0 = TREE_OPERAND (array_op0, 0);
   switch (an_type)
     {
index 0c1b04750aaed44e2c6643939914423e5232db19..c0d1ffcfc43b614f92292e55f07b7a06ff2ff19e 100644 (file)
@@ -200,7 +200,7 @@ cp_ubsan_check_member_access_r (tree *stmt_p, int *walk_subtrees, void *data)
     {
     case ADDR_EXPR:
       t = TREE_OPERAND (stmt, 0);
-      while ((TREE_CODE (t) == MEM_REF || TREE_CODE (t) == INDIRECT_REF)
+      while ((TREE_CODE (t) == MEM_REF || INDIRECT_REF_P (t))
             && TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR)
        t = TREE_OPERAND (TREE_OPERAND (t, 0), 0);
       if (handled_component_p (t))