From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by sourceware.org (Postfix) with ESMTPS id 7EFF83858D1E for ; Wed, 13 Jul 2022 22:30:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7EFF83858D1E Received: by mail-lf1-x12e.google.com with SMTP id bu42so21478530lfb.0 for ; Wed, 13 Jul 2022 15:30:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7UuorqGqD/YYEAjmLn6YVipSeD3+GZxLRd6TgYFeV2c=; b=yXVfMSwKMIgzsoTglx3Pb+6wuGRENLEH76zYvR86EnNSRTRZjZYpqOSLGuGI7wTm3X pMnGqI9qM9XaIRU2/yVqeXjCBKfmelHfmPBGwgFYUotM+TzMbNAacbH+YYxfJFj58TDi C3W9lcBZDWtoaYUAMmXCH6BHkbM7bhY4wH3qdcD97tskLYyW5UBNlgCObQO7jc5ZUKWg QftpXUKhBMj+iz2L/N2sxFfhNNmGZEzPkfQmSNjgmoNYFn/FNAbcVAlbkwiw79rElriu Ay97HbOc8IbEi0diEARfb6uS1lc1EAK5p/fR/QcPzpb0KcDNl44AImeEsUsMNZDIo2RI yKOA== X-Gm-Message-State: AJIora+DUuVK9f7sRjo/jDb14sGOybD8nMcHicvPVEji3N5aou12Sbi1 hoNTa9sXoSfUCruxAq+L3ip/BZSX53F7zvOTU1108QUMQDA= X-Google-Smtp-Source: AGRyM1sSIbzcPhB0bhjl93nhdC1hCsyQai7Mjw685Ufb1VosdkoPoWB+M6M9Rc0Wm9AWBCjKyqYsTnalDDQ26LB2Z2s= X-Received: by 2002:a05:6512:13a7:b0:489:c6a5:d64f with SMTP id p39-20020a05651213a700b00489c6a5d64fmr3428820lfa.113.1657751441281; Wed, 13 Jul 2022 15:30:41 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Lewis Hyatt Date: Wed, 13 Jul 2022 18:30:30 -0400 Message-ID: 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) To: Tobias Burnus Cc: Thomas Schwinge , gcc-patches List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3029.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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 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: Wed, 13 Jul 2022 22:30:45 -0000 On Tue, Jul 12, 2022 at 9:10 AM Tobias Burnus wrote: > 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 = 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. Yes, very much, thank you. I am trying something that should improve it, and also a similar issue that happens with -flto, I made this PR about the latter: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106274