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 <mjam...@suse.cz> 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: > > > > > > > > 1) HSA cannot compile a function for one reason or another (most > > > > common cause is inability of HSA to take an address of a function > > > > or make an indirect call) and gives a warning, which is regarded > > > > as an "excess error" by dejagnu. > > Confirmed: > > [...]/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 > parallel constructs. > [...] > > ..., and many more. So, with --enable-offload-targets=[...],hsa we > regress (PASS -> FAIL; "test for excess errors") such compile tests. > > > > 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 > > > offloading, > > > but have HSA enabled to, but care primarily about the former two, etc. > > > > All these warnings are in the -Whsa group and can be suppressed with > > -Wno-hsa. > > 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üße Thomas