From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id BAB0738FC737; Wed, 7 Dec 2022 14:54:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BAB0738FC737 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.96,225,1665475200"; d="scan'208";a="91971285" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 07 Dec 2022 06:54:48 -0800 IronPort-SDR: VaqRkgR6m0tOTJrxd+3c5mWszWGUd5KaO6Yyu0HxVY1PaYbOxDzBg05Gpmc605hsqNlSBaszc6 qufte2hm31Ap45ZICDR18qmMGzVVrJxs0RRDBkjRugkG/N5n5AzvCzfVOH/YflEF/cqYtQxzhI OKttP/1xxLzFe73zrMRHjoNHxKBb7JBpad2gOhgYbeTrj9oftJO0NBTr8sFZ1nQm2rgkE5FGPA Pl1VUH05AROQ8aD0oW0OT6tV1B+gD75pIftAvpzVBXsAqpDnsBtScOuouN7aPFncv0FcX5vez5 sng= Message-ID: <65824aa6-be83-3c74-871e-6571008f2d25@codesourcery.com> Date: Wed, 7 Dec 2022 15:54:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v5 2/4] OpenMP/OpenACC: Rework clause expansion and nested struct handling Content-Language: en-US To: Julian Brown , CC: , Jakub Jelinek References: <8fcf3df1b40ea77cbb8088962cbcdf6935d2ded3.1666088224.git.julian@codesourcery.com> From: Tobias Burnus In-Reply-To: <8fcf3df1b40ea77cbb8088962cbcdf6935d2ded3.1666088224.git.julian@codesourcery.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Julian, If I understand Deepak's comment (on OpenMP.org's omp-lang list, sorry it is a nonpublic list) correctly, the following wording implies that a 'from: s.w[z:4]' for a pointer 's.w' also implies a mapping of 's.w' - if 's' is used inside the target region and, thus, gets implicitly mapped. [TR11 157:21-26] (approx. [5.2 154:22-27], [5.1 352:17-22], [5.0 320:22-27]= ) "If a list item with an implicit data-mapping attribute does not have any c= orresponding storage in the device data environment prior to a task encount= ering the construct associated with the map clause, and one or more contigu= ous parts of the original storage are either list items or base pointers to= list items that are explicitly mapped on the construct, only those parts o= f the original storage will have corresponding storage in the device data e= nvironment as a result of the map clauses on the construct." Thus, the following change should not be required =E2=80=93 but if I undo i= t, I see a libgomp runtime error. Hence, it looks as if you need to fix thi= s: On 18.10.22 12:39, Julian Brown wrote: > --- a/libgomp/testsuite/libgomp.c/target-22.c > +++ b/libgomp/testsuite/libgomp.c/target-22.c > @@ -21,7 +21,8 @@ main () > s.v.b =3D a + 16; > s.w =3D c + 3; > int err =3D 0; > - #pragma omp target map (to:s.v.b[0:z + 7], s.u[z + 1:z + 4]) \ > + #pragma omp target map (to: s.w, s.v.b, s.u, s.s) \ > + map (to:s.v.b[0:z + 7], s.u[z + 1:z + 4]) \ > map (tofrom:s.s[3:3]) \ > map (from: s.w[z:4], err) private (i) Thanks, Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955