From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72057 invoked by alias); 26 Feb 2016 16:46:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 72025 invoked by uid 89); 26 Feb 2016 16:46:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2975, 45pm, Nathan, mismatch X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 26 Feb 2016 16:46:46 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1aZLXN-00069r-8n from Thomas_Schwinge@mentor.com ; Fri, 26 Feb 2016 08:46:41 -0800 Received: from hertz.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Fri, 26 Feb 2016 16:46:39 +0000 From: Thomas Schwinge To: Martin Jambor , Jakub Jelinek CC: GCC Patches , Richard Biener , Martin Liska , Michael Matz , Nathan Sidwell Subject: Re: (Non-)offloading diagnostics In-Reply-To: <87egd4y5xl.fsf@kepler.schwinge.homeip.net> References: <20151207111758.GA24234@virgil.suse.cz> <20151207114645.GV5675@tucnak.redhat.com> <20151210175147.GE3534@virgil.suse.cz> <87egd4y5xl.fsf@kepler.schwinge.homeip.net> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Fri, 26 Feb 2016 16:46:00 -0000 Message-ID: <87fuwfo1w6.fsf@hertz.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2016-02/txt/msg01826.txt.bz2 Hi! In light of the -Whsa testsuite patches just posted, I think we first need to clarify the general policy questions I posted a month ago: On Tue, 26 Jan 2016 11:46:14 +0100, I wrote: > On Thu, 10 Dec 2015 18:51:48 +0100, Martin Jambor wrote: > > On Mon, Dec 07, 2015 at 12:46:45PM +0100, Jakub Jelinek wrote: > > > On Mon, Dec 07, 2015 at 12:17:58PM +0100, Martin Jambor wrote: > > > > [...] There are no failing > > > > testcases if HSA is not configured. If it is, there are some, all = of > > > > which fall into one the following categories: > > > >=20 > > > > 1) HSA cannot compile a function for one reason or another (most > > > > common cause is inability of HSA to take an address of a funct= ion > > > > or make an indirect call) and gives a warning, which is regard= ed > > > > as an "excess error" by dejagnu. >=20 > Confirmed: >=20 > [...]/gcc/testsuite/c-c++-common/gomp/clauses-1.c: In function 'bar._= omp_fn.26.hsa.31': > cc1: warning: could not emit HSAIL for the function [-Whsa] > cc1: note: support for HSA does not implement non-gridified OpenMP pa= rallel constructs. > [...] >=20 > ..., and many more. So, with --enable-offload-targets=3D[...],hsa we > regress (PASS -> FAIL; "test for excess errors") such compile tests. >=20 > > > It would be good if there is a -W* switch to turn such warnings off. > > > Not just for the purposes of dejagnu libgomp testing, but say one > > > might try to compile a program primarily say for XeonPhi or PTX offlo= ading, > > > but have HSA enabled to, but care primarily about the former two, etc. > >=20 > > All these warnings are in the -Whsa group and can be suppressed with > > -Wno-hsa. >=20 > These compile tests are done without any -W* flags; -Whsa is enabled by > default. I'm a proponent of enabling as many useful warnings by default, or if not by default, then with -Wall. -Whsa is enabled by default, and has thus set a precedent of doing that. > How to address this mismatch? Put -Wno-has into all regressing > test case files individually? Run the affected testsuites with -Wno-hsa? > Not enable -Whsa by default (but I agree it's useful to users)? > (Instead, enable with -Wall, which any sane user should be specifying?) Even if a bit tedious, my preference actually is to add to the test cases an (expected) dg-warning everywhere where such a non-offloading warning currently triggers, because that's what users will be seeing (with -Whsa enabled by default), and because that will make it obvious (PASS -> FAIL for the warning check) when that warning disappears (say, because the compiler can now offload the respective construct, yay). > A very similar problem also exists for nvptx offloading (Nathan CCed), > where we emit similar warnings (enabled by default). As nvptx offloading > happens during link-time (not compile-time, as with hsa offloading), > these don't affect GCC's compile tests, but need to be worked around in > libgomp test cases. Gr=C3=BC=C3=9Fe Thomas