public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/106467] New: [OpenMP] Wrong code with collapse – tree sharing issue.
Date: Thu, 28 Jul 2022 16:08:31 +0000 [thread overview]
Message-ID: <bug-106467-4@http.gcc.gnu.org/bugzilla/> (raw)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106467
Bug ID: 106467
Summary: [OpenMP] Wrong code with collapse – tree sharing
issue.
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, openmp
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
CC: burnus at gcc dot gnu.org, jakub at gcc dot gnu.org,
sandra at gcc dot gnu.org
Depends on: 106449
Target Milestone: ---
Created attachment 53375
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53375&action=edit
Testcase, modified version of libgomp.c-c++-common/pr106449.c from attachment
53370 to PR 106449
+++ This bug was initially created as a clone of Bug #106449 +++
(In reply to Jakub Jelinek from bug 106449 comment #9)
> Created attachment 53370 [details]
> gcc13-pr106449-2.patch
>
> Updated fix for this PR which fixes even the runtime case (it was caused by
> missing unsharing and regimplification clobbering a shared tree).
My potentially wrong impression is that the unshare_tree issue also exists
with a bare collapse.
At least, when converting the testcase from the patch to one which uses 'FOR'
instead of '(FOR) SIMD', it fails for BAR in a similar way as the SIMD version
with the initial version of the patch.
Namely, the result it the __builtin_abort call for i = 24 in bar (n=64, m=128):
33 for (i = 0; i < 32768; i++)
34 if (b[2 * i] != &a[i / 64] || b[2 * i + 1] != &a[(i / 64) + 64 + (i
% 64)])
35 __builtin_abort ();
The LHS of the is false (sub-LHS/sub-RHS are idential) but the RHS, i.e.
b[2 * i + 1] != &a[(i / 64) + 64 + (i % 64)]
fails as
b[2 * i + 1] = 0x7fffffffd588
while
&a[(i / 64) + 64 + (i % 64)] = 0x7fffffffd490
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106449
[Bug 106449] ICE in #pragma omp parallel for simd since
r6-4544-ge01d41e553aae245
next reply other threads:[~2022-07-28 16:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 16:08 burnus at gcc dot gnu.org [this message]
2022-07-28 16:44 ` [Bug middle-end/106467] " burnus at gcc dot gnu.org
2022-07-28 16:45 ` burnus at gcc dot gnu.org
2022-07-28 17:14 ` jakub at gcc dot gnu.org
2022-07-29 10:42 ` burnus at gcc dot gnu.org
2022-11-03 14:10 ` jakub 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-106467-4@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: link
Be 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).