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 AB08C3857C7D for ; Tue, 12 Jul 2022 13:10:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AB08C3857C7D 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.92,265,1650960000"; d="scan'208";a="81355258" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 12 Jul 2022 05:10:07 -0800 IronPort-SDR: pDahsfSzySE6MoJP5AQf1JI2advlkgJ94dOYpBNNLAeO7v3Gi8GCjlTkezvK4wO5a+O0qSI6kp eX6rWHCVkvDufnQMBXKLaZDLU5v5kWPfs7ryUe3VuikWDn26D3jiiut53Eo4J+eZmmO5wxIbw+ 1dF2hzM6c/q402d6fi+QWfQ/MYnh5rfL0GyoXvhyk72M7FFO03o57aWStica4MUT57vj2U6KKN ZtaH2mR7rF77sf6hv1s8CpANK1KvjK+2LCdKYnmO4x3zEUSp0z+Y6N5GV6+ceAs+QYvGxgipI3 H7k= Message-ID: Date: Tue, 12 Jul 2022 15:10:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: XFAIL 'offloading_enabled' diagnostics issue in 'libgomp.oacc-c-c++-common/reduction-5.c' [PR101551] (was: Enhance '_Pragma' diagnostics verification in OMP C/C++ test cases) Content-Language: en-US To: Lewis Hyatt , Thomas Schwinge CC: gcc-patches List References: <20220709205230.GA4991@ldh-imac.local> <377c7016-633c-f354-8c21-599ff2b56449@gmail.com> <87edys3spb.fsf@euler.schwinge.homeip.net> <87bktu4z7m.fsf@euler.schwinge.homeip.net> From: Tobias Burnus In-Reply-To: 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-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2022 13:10:15 -0000 Hi, On 12.07.22 13:50, Lewis Hyatt via Gcc-patches wrote: > On Tue, Jul 12, 2022 at 2:33 AM Thomas Schwinge = wrote: >> On 2022-07-11T11:27:12+0200, I wrote: >>> Oh my, PR101551 "[offloading] Differences in diagnostics etc." >>> strikes again... The latter two 'note' diagnostics are currently >>> only emitted in non-offloading configurations. I've now pushed to >>> master branch commit 3723aedaad20a129741c2f6f3c22b3dd1220a3fc >>> "XFAIL 'offloading_enabled' diagnostics issue in >>> 'libgomp.oacc-c-c++-common/reduction-5.c' [PR101551]", see attached. > Would you mind please confirming how I need to run configure in order > to get this configuration? Then I can look into why the difference in > location information there. Thanks. I think the simplest to replicate it without much effort is to run: cd ${GCC-SRC}/gcc sed -e 's/ENABLE_OFFLOADING/true/' *.cc */*.cc I think that covers all cases, which do not need the target lto1. If they do do - then it becomes more difficult as you need an offloading compiler. (But that is rather about: diagnostic or no diagostic and not about having a different diagnostic.) I think the different diagnostic has the reason stated in commit r12-135-gbd7ebe9da745a62184052dd1b15f4dd10fbdc9f4 Namely: ----cut--- It turned out that a compiler built without offloading support and one with can produce slightly different diagnostic. Offloading support implies ENABLE_OFFLOAD which implies that g->have_offload is set when offloading is actually needed. In cgraphunit.c, the latter causes flag_generate_offload =3D 1, which in turn affects tree.c's free_lang_data. The result is that the front-end specific diagnostic gets reset ('tree_diagnostics_defaults (global_dc)'), which affects in this case 'Warning' vs. 'warning' via the Fortran frontend. Result: 'Warning:' vs. 'warning:'. Side note: Other FE also override the diagnostic, leading to similar differences, e.g. the C++ FE outputs mangled function names differently ----cut------ If the message is from the offload-device's lto1 compiler, it becomes more difficult to configure+build GCC. See https://gcc.gnu.org/wiki/Offloading under "How to build an offloading-enabled GCC" I hope it helps. 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