OSDN Git Service

gcc/cp/
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-operands.c
index 102ed5a..71fb883 100644 (file)
@@ -2093,17 +2093,22 @@ get_expr_operands (tree stmt, tree *expr_p, int flags)
 
     case OMP_FOR:
       {
-       tree init = OMP_FOR_INIT (expr);
-       tree cond = OMP_FOR_COND (expr);
-       tree incr = OMP_FOR_INCR (expr);
        tree c, clauses = OMP_FOR_CLAUSES (stmt);
+       int i;
 
-       get_expr_operands (stmt, &GIMPLE_STMT_OPERAND (init, 0), opf_def);
-       get_expr_operands (stmt, &GIMPLE_STMT_OPERAND (init, 1), opf_use);
-       get_expr_operands (stmt, &TREE_OPERAND (cond, 1), opf_use);
-       get_expr_operands (stmt,
-                          &TREE_OPERAND (GIMPLE_STMT_OPERAND (incr, 1), 1),
-                          opf_use);
+       for (i = 0; i < TREE_VEC_LENGTH (OMP_FOR_INIT (expr)); i++)
+         {
+           tree init = TREE_VEC_ELT (OMP_FOR_INIT (expr), i);
+           tree cond = TREE_VEC_ELT (OMP_FOR_COND (expr), i);
+           tree incr = TREE_VEC_ELT (OMP_FOR_INCR (expr), i);
+
+           get_expr_operands (stmt, &GIMPLE_STMT_OPERAND (init, 0), opf_def);
+           get_expr_operands (stmt, &GIMPLE_STMT_OPERAND (init, 1), opf_use);
+           get_expr_operands (stmt, &TREE_OPERAND (cond, 1), opf_use);
+           get_expr_operands (stmt,
+                              &TREE_OPERAND (GIMPLE_STMT_OPERAND (incr, 1),
+                                             1), opf_use);
+         }
 
        c = find_omp_clause (clauses, OMP_CLAUSE_SCHEDULE);
        if (c)