From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id C347A3858D37; Fri, 28 Apr 2023 08:17:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C347A3858D37 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.99,234,1677571200"; d="scan'208";a="3753886" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 28 Apr 2023 00:17:02 -0800 IronPort-SDR: tDzzVy9pmS2fNQ04BEvtjH7b5uWr0ENeKogaEX8N3+HcwCFGSz+8yrJPGKimGQYcbBnNPuWYrt GQD3xFQVEz7x5V9w4G+rDCl8/vYh3/Zxpw/lO9dC0WRgHWspr196OX10ioH0xCL9PUXKGLMLNO wxw9mn86G9NncYIH4/ahHHsfx57yyyTUhak1pkoIxLYrTuI7kknKP330wiXyqtDh2TrENZ8i4P FXihD6/WjCk8RL91w9/rOR9S5Dkoyv1nI7sGlQv8HN/RzlOdY4iNVCbeFYSdkbSEe880kNDS6B 8SM= Message-ID: <31bab6a0-ae98-4082-6034-6586876fb48a@codesourcery.com> Date: Fri, 28 Apr 2023 10:16:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH] OpenACC: Stand-alone attach/detach clause fixes for Fortran [PR109622] Content-Language: en-US To: Julian Brown , CC: , , References: <20230427183647.99112-1-julian@codesourcery.com> From: Tobias Burnus In-Reply-To: <20230427183647.99112-1-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-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: On 27.04.23 20:36, Julian Brown wrote: > This patch fixes several cases where multiple attach or detach mapping > nodes were being created for stand-alone attach or detach clauses > in Fortran. After the introduction of stricter checking later during > compilation, these extra nodes could cause ICEs, as seen in the PR. > > The patch also fixes cases that "happened to work" previously where > the user attaches/detaches a pointer to array using a descriptor, and > (I think!) the "_data" field has offset zero, hence the same address as > the descriptor as a whole. > > Tested with offloading to nvptx. OK? LGTM for mainline and, after some grace period, for GCC 13. Thanks, Tobias > 2023-04-27 Julian Brown > > PR fortran/109622 > > gcc/fortran/ > * trans-openmp.cc (gfc_trans_omp_clauses): Attach/detach clause fix= es. > > gcc/testsuite/ > * gfortran.dg/goacc/attach-descriptor.f90: Adjust expected output. > > libgomp/ > * testsuite/libgomp.fortran/pr109622.f90: New test. > * testsuite/libgomp.fortran/pr109622-2.f90: New test. > * testsuite/libgomp.fortran/pr109622-3.f90: New test. ----------------- 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