public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100321] [OpenMP][nvptx, SIMT] (Con't) Reduction fails with optimization and 'loop'/'for simd' but not with 'for' Date: Thu, 29 Apr 2021 15:09:57 +0000 [thread overview] Message-ID: <bug-100321-4-BWL6arG1Bx@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100321-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100321 --- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> --- C example: ... /* { dg-additional-options "-foffload=-latomic" } */ #include <stdio.h> struct s { int i; }; #pragma omp declare reduction(+: struct s: omp_out.i += omp_in.i) int main (void) { const int N0 = 32768; printf ("Expected: %d\n", N0); struct s counter_N0 = { 0 }; #pragma omp target #pragma omp for simd reduction(+: counter_N0) for (int i0 = 0 ; i0 < N0 ; i0++ ) counter_N0.i += 1; printf ("Got : %d\n", counter_N0.i); return 0; } ...
next prev parent reply other threads:[~2021-04-29 15:09 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-28 15:36 [Bug target/100321] New: [OpenMP][nvptx] " burnus at gcc dot gnu.org 2021-04-28 21:15 ` [Bug target/100321] " vries at gcc dot gnu.org 2021-04-29 6:24 ` [Bug target/100321] [OpenMP][nvptx, SIMT] " vries at gcc dot gnu.org 2021-04-29 15:09 ` vries at gcc dot gnu.org [this message] 2021-04-29 15:18 ` vries at gcc dot gnu.org 2021-05-03 10:26 ` vries at gcc dot gnu.org 2021-05-03 21:14 ` cvs-commit at gcc dot gnu.org 2021-05-03 21:15 ` vries at gcc dot gnu.org
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=bug-100321-4-BWL6arG1Bx@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).