--- Comment #21 from Thomas Koenig <tkoenig at gcc dot> ---

(In reply to Jakub Jelinek from comment #20)

> Does autopar break this (i.e. create the loop) even without the ANNOTATE, or
> does it give up on the analysis?

It just gives up.

The following patch

Removing the annotation via

Index: trans-stmt.c
--- trans-stmt.c        (Revision 259222)
+++ trans-stmt.c        (Arbeitskopie)
@@ -3642,12 +3642,13 @@ gfc_trans_forall_loop (forall_info *forall_tmp, tr
       /* The exit condition.  */
       cond = fold_build2_loc (input_location, LE_EXPR, logical_type_node,
                              count, build_int_cst (TREE_TYPE (count), 0));
+#if 0
       if (forall_tmp->do_concurrent)
        cond = build3 (ANNOTATE_EXPR, TREE_TYPE (cond), cond,
                       build_int_cst (integer_type_node,
       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));

removes parallelization and makes the test case succeed.

We could also think about annotating compiler-generated temporaries

Reply via email to