public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Tobias Burnus <burnus@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-12] Fix omp-expand.cc's expand_omp_target for OpenACC Date: Wed, 19 Oct 2022 15:34:46 +0000 (GMT) [thread overview] Message-ID: <20221019153446.09E31385843E@sourceware.org> (raw) https://gcc.gnu.org/g:0d6fc5032c7ba8a95301d0ccbc418875e73955ac commit 0d6fc5032c7ba8a95301d0ccbc418875e73955ac Author: Tobias Burnus <tobias@codesourcery.com> Date: Wed Oct 19 17:31:14 2022 +0200 Fix omp-expand.cc's expand_omp_target for OpenACC In OG12 commit a6c1eccffb161130351d891dc87f5afe54f8075c, "Fortran/OpenMP: Support mapping of DT with allocatable components" the size of the addr/sizes/kind arrays was passed as 4th argument. However, OpenACC uses >3 arguments for its own purpose, e.g. to handle noncontiguous arrays by passing an array descriptor there. This patch restores the previous behaviour for OpenACC, fixing testcases like libgomp.oacc-c-c++-common/noncontig_array-1.c. gcc/ * omp-expand.cc (expand_omp_target): Fix OpenACC in case there are more than 3 arguments to the builtin function. Diff: --- gcc/ChangeLog.omp | 5 +++++ gcc/omp-expand.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index 527a9850dba..32a8c7b485f 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -1,3 +1,8 @@ +2022-10-19 Tobias Burnus <tobias@codesourcery.com> + + * omp-expand.cc (expand_omp_target): Fix OpenACC in case there + are more than 3 arguments to the builtin function. + 2022-10-17 Thomas Schwinge <thomas@codesourcery.com> Backported from master: diff --git a/gcc/omp-expand.cc b/gcc/omp-expand.cc index 92996685d41..6529f63362b 100644 --- a/gcc/omp-expand.cc +++ b/gcc/omp-expand.cc @@ -10456,7 +10456,7 @@ expand_omp_target (struct omp_region *region) t3 = t2; t4 = t2; } - else if (TREE_VEC_LENGTH (t) == 3) + else if (TREE_VEC_LENGTH (t) == 3 || is_gimple_omp_oacc (entry_stmt)) { t1 = TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (TREE_VEC_ELT (t, 1)))); t1 = size_binop (PLUS_EXPR, t1, size_int (1));
reply other threads:[~2022-10-19 15:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221019153446.09E31385843E@sourceware.org \ --to=burnus@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).