public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/106045] Incorrect testcase in libgomp.c/target-31.c at -O0 Date: Tue, 28 Jun 2022 15:32:14 +0000 [thread overview] Message-ID: <bug-106045-4-ipE7dEL7cD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106045-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106045 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:d67dfc5f80e537460ebf809758a0e673028ebad7 commit r12-8521-gd67dfc5f80e537460ebf809758a0e673028ebad7 Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Jun 21 17:51:08 2022 +0200 libgomp: Fix up target-31.c test [PR106045] The i variable is used inside of the parallel in: #pragma omp simd safelen(32) private (v) for (i = 0; i < 64; i++) { v = 3 * i; ll[i] = u1 + v * u2[0] + u2[1] + x + y[0] + y[1] + v + h[0] + u3[i]; } where i is predetermined linear (so while inside of the body it is safe, private per SIMD lane var) the final value is written to the shared variable, and in: for (i = 0; i < 64; i++) if (ll[i] != u1 + 3 * i * u2[0] + u2[1] + x + y[0] + y[1] + 3 * i + 13 + 14 + i) #pragma omp atomic write err = 1; which is a normal loop and so it isn't in any way privatized there. So we have a data race, fixed by adding private (i) clause to the parallel. 2022-06-21 Jakub Jelinek <jakub@redhat.com> Paul Iannetta <piannetta@kalrayinc.com> PR libgomp/106045 * testsuite/libgomp.c/target-31.c: Add private (i) clause. (cherry picked from commit 85d613da341b76308edea48359a5dbc7061937c4)
next prev parent reply other threads:[~2022-06-28 15:32 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-21 14:20 [Bug libgomp/106045] New: " piannetta at kalrayinc dot com 2022-06-21 15:57 ` [Bug libgomp/106045] " cvs-commit at gcc dot gnu.org 2022-06-21 16:16 ` jakub at gcc dot gnu.org 2022-06-28 15:32 ` cvs-commit at gcc dot gnu.org [this message] 2022-11-04 8:30 ` cvs-commit at gcc dot gnu.org 2022-11-28 22:10 ` pinskia at gcc dot gnu.org 2023-05-03 15:18 ` cvs-commit 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-106045-4-ipE7dEL7cD@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).