From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4183D385841F; Wed, 13 Dec 2023 20:42:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4183D385841F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702500174; bh=S5LNtJJf7KaGBapfDT9fwgNbeQ7aDWF7xw+f8L3XGEU=; h=From:To:Subject:Date:From; b=hC4LCFdw87nyrW7NEjSxCnSejrP0+rsPGmSxiS/C79YGvKY7iYzEJoR0eqUkTFMCa iQrVY33JAfYiPubZ/gAiq57ntvLhEHoDaMibGLw9rFWxR+dIimSToeY15mvq9w6i9R IUebCTwf5KvcGND5XRNMiTvc4UxANDa56dGVE97I= From: "jules at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113004] New: OpenMP 5 - structs are not mapped element-wise by default Date: Wed, 13 Dec 2023 20:42:53 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jules 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 bug_severity priority component assigned_to reporter target_milestone 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113004 Bug ID: 113004 Summary: OpenMP 5 - structs are not mapped element-wise by default Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: jules at gcc dot gnu.org Target Milestone: --- According to e.g. OpenMP 5.2, "5.8.2 Mapper Identifiers and mapper Modifier= s": "A structure type T has a predefined default mapper that is defined as if b= y a declare mapper directive that specifies v in a map clause with the alloc map-type and each structure element of v in a map clause with the tofrom map-type." At present, a variable of struct type will be mapped as as a single block (= the pre-OpenMP 5.0 legacy behaviour). This works fine most of the time, but for example fails in the case where o= ne of the struct's members is a reference, demonstrated in the test case: libgomp/testsuite/libgomp.c++/target-49.C Once "declare mapper" support is committed, cases where a struct with an implicit default mapper should invoke a struct with a *non*-default mapper, will also probably be mishandled.=