This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/83064] [8 Regression] DO CONCURRENT inconsistent results


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83064

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

(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,
                                      annot_expr_parallel_kind),
                       integer_zero_node);
-
+#endif
       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
within DO CONCURRENT.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]