From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 560063858C51; Thu, 28 Jul 2022 16:08:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 560063858C51 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBtaWRkbGUtZW5kLzEwNjQ2N10gTmV3OiBbT3Blbk1QXSBX?= =?UTF-8?B?cm9uZyBjb2RlIHdpdGggY29sbGFwc2Ug4oCTIHRyZWUgc2hhcmluZyBpc3N1?= =?UTF-8?B?ZS4=?= Date: Thu, 28 Jul 2022 16:08:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc dependson target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2022 16:08:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106467 Bug ID: 106467 Summary: [OpenMP] Wrong code with collapse =E2=80=93 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=3D53375&action=3Dedit Testcase, modified version of libgomp.c-c++-common/pr106449.c from attachme= nt 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 >=20 > 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 'FO= R' instead of '(FOR) SIMD', it fails for BAR in a similar way as the SIMD vers= ion with the initial version of the patch. Namely, the result it the __builtin_abort call for i =3D 24 in bar (n=3D64,= m=3D128): 33 for (i =3D 0; i < 32768; i++) 34 if (b[2 * i] !=3D &a[i / 64] || b[2 * i + 1] !=3D &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] !=3D &a[(i / 64) + 64 + (i % 64)] fails as=20 b[2 * i + 1] =3D 0x7fffffffd588 while &a[(i / 64) + 64 + (i % 64)] =3D 0x7fffffffd490 Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106449 [Bug 106449] ICE in #pragma omp parallel for simd since r6-4544-ge01d41e553aae245=