PR c++/68795: fix uninitialized close_paren_loc in cp_parser_postfix_expression
[gcc.git] / gcc / gimple-walk.c
index b416ac82dd7d039cf1eb64d035c66fd8af2670a4..6c0a46dee49aa6e4b693d968c08a13c69d79340b 100644 (file)
@@ -1,6 +1,6 @@
 /* Gimple walk support.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
    Contributed by Aldy Hernandez <aldyh@redhat.com>
 
 This file is part of GCC.
@@ -22,19 +22,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
-#include "input.h"
-#include "alias.h"
-#include "symtab.h"
+#include "backend.h"
 #include "tree.h"
-#include "predict.h"
-#include "hard-reg-set.h"
-#include "function.h"
-#include "gimple-expr.h"
-#include "is-a.h"
-#include "tree-ssa-alias.h"
-#include "basic-block.h"
-#include "fold-const.h"
 #include "gimple.h"
 #include "gimple-iterator.h"
 #include "gimple-walk.h"
@@ -51,7 +40,7 @@ along with GCC; see the file COPYING3.  If not see
 
    Otherwise, all the statements are walked and NULL returned.  */
 
-gimple
+gimple *
 walk_gimple_seq_mod (gimple_seq *pseq, walk_stmt_fn callback_stmt,
                     walk_tree_fn callback_op, struct walk_stmt_info *wi)
 {
@@ -84,12 +73,12 @@ walk_gimple_seq_mod (gimple_seq *pseq, walk_stmt_fn callback_stmt,
 /* Like walk_gimple_seq_mod, but ensure that the head of SEQ isn't
    changed by the callbacks.  */
 
-gimple
+gimple *
 walk_gimple_seq (gimple_seq seq, walk_stmt_fn callback_stmt,
                 walk_tree_fn callback_op, struct walk_stmt_info *wi)
 {
   gimple_seq seq2 = seq;
-  gimple ret = walk_gimple_seq_mod (&seq2, callback_stmt, callback_op, wi);
+  gimple *ret = walk_gimple_seq_mod (&seq2, callback_stmt, callback_op, wi);
   gcc_assert (seq2 == seq);
   return ret;
 }
@@ -186,7 +175,7 @@ walk_gimple_asm (gasm *stmt, walk_tree_fn callback_op,
    NULL_TREE if no CALLBACK_OP is specified.  */
 
 tree
-walk_gimple_op (gimple stmt, walk_tree_fn callback_op,
+walk_gimple_op (gimple *stmt, walk_tree_fn callback_op,
                struct walk_stmt_info *wi)
 {
   hash_set<tree> *pset = (wi) ? wi->pset : NULL;
@@ -328,6 +317,20 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op,
                         callback_op, wi, pset);
        if (ret)
          return ret;
+       ret = walk_tree (gimple_omp_critical_clauses_ptr (omp_stmt),
+                        callback_op, wi, pset);
+       if (ret)
+         return ret;
+      }
+      break;
+
+    case GIMPLE_OMP_ORDERED:
+      {
+       gomp_ordered *omp_stmt = as_a <gomp_ordered *> (stmt);
+       ret = walk_tree (gimple_omp_ordered_clauses_ptr (omp_stmt),
+                        callback_op, wi, pset);
+       if (ret)
+         return ret;
       }
       break;
 
@@ -471,11 +474,22 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op,
       break;
 
     case GIMPLE_TRANSACTION:
-      ret = walk_tree (gimple_transaction_label_ptr (
-                        as_a <gtransaction *> (stmt)),
-                      callback_op, wi, pset);
-      if (ret)
-       return ret;
+      {
+       gtransaction *txn = as_a <gtransaction *> (stmt);
+
+       ret = walk_tree (gimple_transaction_label_norm_ptr (txn),
+                        callback_op, wi, pset);
+       if (ret)
+         return ret;
+       ret = walk_tree (gimple_transaction_label_uninst_ptr (txn),
+                        callback_op, wi, pset);
+       if (ret)
+         return ret;
+       ret = walk_tree (gimple_transaction_label_over_ptr (txn),
+                        callback_op, wi, pset);
+       if (ret)
+         return ret;
+      }
       break;
 
     case GIMPLE_OMP_RETURN:
@@ -529,9 +543,9 @@ tree
 walk_gimple_stmt (gimple_stmt_iterator *gsi, walk_stmt_fn callback_stmt,
                  walk_tree_fn callback_op, struct walk_stmt_info *wi)
 {
-  gimple ret;
+  gimple *ret;
   tree tree_ret;
-  gimple stmt = gsi_stmt (*gsi);
+  gimple *stmt = gsi_stmt (*gsi);
 
   if (wi)
     {
@@ -696,7 +710,7 @@ get_base_loadstore (tree op)
    Returns the results of these callbacks or'ed.  */
 
 bool
-walk_stmt_load_store_addr_ops (gimple stmt, void *data,
+walk_stmt_load_store_addr_ops (gimple *stmt, void *data,
                               walk_stmt_load_store_addr_fn visit_load,
                               walk_stmt_load_store_addr_fn visit_store,
                               walk_stmt_load_store_addr_fn visit_addr)
@@ -914,7 +928,7 @@ walk_stmt_load_store_addr_ops (gimple stmt, void *data,
    should make a faster clone for this case.  */
 
 bool
-walk_stmt_load_store_ops (gimple stmt, void *data,
+walk_stmt_load_store_ops (gimple *stmt, void *data,
                          walk_stmt_load_store_addr_fn visit_load,
                          walk_stmt_load_store_addr_fn visit_store)
 {