public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-983] [OpenACC privatization] Don't let unhandled 'IFN_UNIQUE_OACC_PRIVATE' linger [PR90115] Date: Fri, 21 May 2021 18:54:39 +0000 (GMT) [thread overview] Message-ID: <20210521185439.A8E13384783B@sourceware.org> (raw) https://gcc.gnu.org/g:ff451ea723deb3fe8471eb96ac9381c063ec6533 commit r12-983-gff451ea723deb3fe8471eb96ac9381c063ec6533 Author: Thomas Schwinge <thomas@codesourcery.com> Date: Thu May 20 15:37:07 2021 +0200 [OpenACC privatization] Don't let unhandled 'IFN_UNIQUE_OACC_PRIVATE' linger [PR90115] Make sure they're all handled in 'execute_oacc_device_lower'. Why we at all can have 'level == -1' cases is a separate bug to be fixed. gcc/ PR middle-end/90115 * omp-offload.c (execute_oacc_device_lower) <IFN_UNIQUE_OACC_PRIVATE>: Diagnose and handle for 'level == -1' case, too. * internal-fn.c (expand_UNIQUE): Don't expect 'IFN_UNIQUE_OACC_PRIVATE'. Diff: --- gcc/internal-fn.c | 2 -- gcc/omp-offload.c | 10 ++++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c index d92080c8077..d209a52f823 100644 --- a/gcc/internal-fn.c +++ b/gcc/internal-fn.c @@ -2969,8 +2969,6 @@ expand_UNIQUE (internal_fn, gcall *stmt) else gcc_unreachable (); break; - case IFN_UNIQUE_OACC_PRIVATE: - break; } if (pattern) diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c index 080bdddfe88..36bd2e44d81 100644 --- a/gcc/omp-offload.c +++ b/gcc/omp-offload.c @@ -2139,8 +2139,9 @@ execute_oacc_device_lower () { HOST_WIDE_INT level = TREE_INT_CST_LOW (gimple_call_arg (call, 2)); - if (level == -1) - break; + gcc_checking_assert (level == -1 + || (level >= 0 + && level < GOMP_DIM_MAX)); for (unsigned i = 3; i < gimple_call_num_args (call); i++) @@ -2156,11 +2157,12 @@ execute_oacc_device_lower () { "gang", "worker", "vector" }; fprintf (dump_file, "Decl UID %u has %s " "partitioning:", DECL_UID (decl), - axes[level]); + (level == -1 ? "UNKNOWN" : axes[level])); print_generic_decl (dump_file, decl, TDF_SLIM); fputc ('\n', dump_file); } - if (targetm.goacc.adjust_private_decl) + if (level != -1 + && targetm.goacc.adjust_private_decl) { tree oldtype = TREE_TYPE (decl); tree newdecl
reply other threads:[~2021-05-21 18:54 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=20210521185439.A8E13384783B@sourceware.org \ --to=tschwinge@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).