This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/77973] [6/7 Regression] ICE in scan_omp_1_op, at omp-low.c:3841
- From: "jamborm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 14 Oct 2016 14:57:32 +0000
- Subject: [Bug fortran/77973] [6/7 Regression] ICE in scan_omp_1_op, at omp-low.c:3841
- Auto-submitted: auto-generated
- References: <bug-77973-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77973
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> ---
The variable is introduced to the clause in the omp_finish_clause
lang_hook. The following patch (untested) fixes it for me. Jakub, is
it even remotely close to a proper fix?
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index c8de1e6..98c63d1 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -7733,6 +7733,10 @@ gimplify_adjust_omp_clauses_1 (splay_tree_node n, void
*data)
struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp;
gimplify_omp_ctxp = ctx->outer_context;
lang_hooks.decls.omp_finish_clause (clause, pre_p);
+ if (code == OMP_CLAUSE_MAP
+ && gimplify_omp_ctxp
+ && DECL_P (OMP_CLAUSE_SIZE (clause)))
+ omp_notice_variable (gimplify_omp_ctxp, OMP_CLAUSE_SIZE (clause), true);
gimplify_omp_ctxp = ctx;
return 0;
}