gcc/ChangeLog.gimple-classes:
        * cfgexpand.c (gimple_assign_rhs_to_tree): Strengthen param from
        gimple to const gassign *.
        (expand_debug_expr): Add checked cast.
        (expand_gimple_basic_block): Likewise.
        * cfgexpand.h (gimple_assign_rhs_to_tree): Strengthen param from
        gimple to const gassign *.
        * tree-ssa.c (insert_debug_temp_for_var_def): Add checked cast.
---
 gcc/ChangeLog.gimple-classes | 10 ++++++++++
 gcc/cfgexpand.c              |  8 +++++---
 gcc/cfgexpand.h              |  2 +-
 gcc/tree-ssa.c               |  2 +-
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/gcc/ChangeLog.gimple-classes b/gcc/ChangeLog.gimple-classes
index 631e0df..17a7c80 100644
--- a/gcc/ChangeLog.gimple-classes
+++ b/gcc/ChangeLog.gimple-classes
@@ -1,5 +1,15 @@
 2014-11-04  David Malcolm  <dmalc...@redhat.com>
 
+       * cfgexpand.c (gimple_assign_rhs_to_tree): Strengthen param from
+       gimple to const gassign *.
+       (expand_debug_expr): Add checked cast.
+       (expand_gimple_basic_block): Likewise.
+       * cfgexpand.h (gimple_assign_rhs_to_tree): Strengthen param from
+       gimple to const gassign *.
+       * tree-ssa.c (insert_debug_temp_for_var_def): Add checked cast.
+
+2014-11-04  David Malcolm  <dmalc...@redhat.com>
+
        * asan.c (asan_expand_check_ifn): Strengthen local "shadow_test"
        from gimple to gassign *.  Introduce gassign * locals "add_7",
        "cast", "t_ge_shadow", "and_expr", using them in place of
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 73862eb..279202d 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -108,7 +108,7 @@ static rtx expand_debug_expr (tree);
    statement STMT.  */
 
 tree
-gimple_assign_rhs_to_tree (gimple stmt)
+gimple_assign_rhs_to_tree (const gassign *stmt)
 {
   tree t;
   enum gimple_rhs_class grhs_class;
@@ -4558,7 +4558,8 @@ expand_debug_expr (tree exp)
        gimple g = get_gimple_for_ssa_name (exp);
        if (g)
          {
-           op0 = expand_debug_expr (gimple_assign_rhs_to_tree (g));
+           op0 = expand_debug_expr (gimple_assign_rhs_to_tree (
+                                      as_a <gassign *> (g)));
            if (!op0)
              return NULL;
          }
@@ -5044,7 +5045,8 @@ expand_gimple_basic_block (basic_block bb, bool 
disable_tail_calls)
                       replace all uses of OP in debug insns with that
                       temporary.  */
                    gimple debugstmt;
-                   tree value = gimple_assign_rhs_to_tree (def);
+                   tree value =
+                     gimple_assign_rhs_to_tree (as_a <gassign *> (def));
                    tree vexpr = make_node (DEBUG_EXPR_DECL);
                    rtx val;
                    enum machine_mode mode;
diff --git a/gcc/cfgexpand.h b/gcc/cfgexpand.h
index 6314b83..2b13996 100644
--- a/gcc/cfgexpand.h
+++ b/gcc/cfgexpand.h
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_CFGEXPAND_H
 #define GCC_CFGEXPAND_H
 
-extern tree gimple_assign_rhs_to_tree (gimple);
+extern tree gimple_assign_rhs_to_tree (const gassign *);
 extern HOST_WIDE_INT estimated_stack_frame_size (struct cgraph_node *);
 
 #endif /* GCC_CFGEXPAND_H */
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index b893df9..f23107c 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -416,7 +416,7 @@ insert_debug_temp_for_var_def (gimple_stmt_iterator *gsi, 
tree var)
        }
 
       if (!no_value)
-       value = gimple_assign_rhs_to_tree (def_stmt);
+       value = gimple_assign_rhs_to_tree (as_a <gassign *> (def_stmt));
     }
 
   if (value)
-- 
1.7.11.7

Reply via email to