+2013-10-24 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/44646
+ * trans-stmt.c (struct forall_info): Add do_concurrent field.
+ (gfc_trans_forall_1): Set it for do concurrent.
+ (gfc_trans_forall_loop): Mark those as annot_expr_ivdep_kind.
+
2013-10-23 Tobias Burnus <burnus@net-b.de>
PR fortran/58793
int nvar;
tree size;
struct forall_info *prev_nest;
+ bool do_concurrent;
}
forall_info;
/* The exit condition. */
cond = fold_build2_loc (input_location, LE_EXPR, boolean_type_node,
count, build_int_cst (TREE_TYPE (count), 0));
+ if (forall_tmp->do_concurrent)
+ cond = build2 (ANNOTATE_EXPR, TREE_TYPE (cond), cond,
+ build_int_cst (integer_type_node,
+ annot_expr_ivdep_kind));
+
tmp = build1_v (GOTO_EXPR, exit_label);
tmp = fold_build3_loc (input_location, COND_EXPR, void_type_node,
cond, tmp, build_empty_stmt (input_location));
}
tmp = gfc_finish_block (&body);
+ nested_forall_info->do_concurrent = true;
tmp = gfc_trans_nested_forall_loop (nested_forall_info, tmp, 1);
gfc_add_expr_to_block (&block, tmp);
goto done;
+2013-08-24 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/44646
+ * gfortran.dg/vect/vect-do-concurrent-1.f90: New.
+
2013-10-24 Dehao Chen <dehao@google.com>
* g++.dg/opt/devirt3.C: New test.
--- /dev/null
+! { dg-do compile }
+! { dg-require-effective-target vect_float }
+! { dg-options "-O3 -fopt-info-vec-optimized" }
+
+subroutine test(n, a, b, c)
+ integer, value :: n
+ real, contiguous, pointer :: a(:), b(:), c(:)
+ integer :: i
+ do concurrent (i = 1:n)
+ a(i) = b(i) + c(i)
+ end do
+end subroutine test
+
+! { dg-message "loop vectorized" "" { target *-*-* } 0 }
+! { dg-bogus "version" "" { target *-*-* } 0 }
+! { dg-bogus "alias" "" { target *-*-* } 0 }
+! { dg-final { cleanup-tree-dump "vect" } }