From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 319473858D38; Sat, 10 Feb 2024 18:07:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 319473858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707588463; bh=NpyStv9JhsJXOvzhW0bR1Qnbjq+fENaDGlglpvcSXSg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=D2gD8VJlQfCfdwesvSuBBegFqyPhjmQWf97q46KSc+GClDAYjERCPoKaB1KF3RN4m vo/H8VAAi/IePPmUYe+F5MyS9trynHMQ3hfhdyYC49dGu4+X614tEOHP6YrUkQ0xDe 54El0kca9gdFJtaDTjvwZtF64XPJS+aTkeAgBzKA= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113867] [14 Regression][OpenMP] Wrong code with mapping pointers in structs Date: Sat, 10 Feb 2024 18:07:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: openmp, wrong-code 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: attachments.created Message-ID: In-Reply-To: References: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113867 --- Comment #1 from Tobias Burnus --- Created attachment 57382 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57382&action=3Dedit Fortran testcase, kind of, as pointer + pointee mapping cannot be split (working) For completeness, a Fortran testcase. (This Testcase works on GCC 13 and mainline.) As in Fortran, 'map(ptr, dt%ptr)' will always attempt to map the pointer and the pointer, it is not possible to split map(s2.p[:N]) // map the pointee map(s2.p, s2.p[:0]) // map the pointer and try pointer attachment as in C/C++. And using 'map(s.p)' will prevent a later inner 'map(s.a,...)'= as 's' is already partially mapped. Hence, the aux 'ptr' is used, but that kin= d of defeats the purpose of this testcase.=