Hi Tobias! On 2020-06-12T16:12:44+0200, Tobias Burnus <tob...@codesourcery.com> wrote: > For real offloading compilers, the configure-time ENABLE_OFFLOAD > macro is set to true.
I once toyed with the idea of getting rid of that configure-time 'ENABLE_OFFLOAD' flag, moving it to GCC run time, implicitly set by '-fopenacc' etc. But it's not trivial, in particular inside libgomp, if I now remember correctly. And, that wouldn't help with this issue here, anyway. ;-) > If it is set, some additional code paths > are enabled – which can affect code generation with -fopenmp/-fopenacc. > > As the PR shows, this can make differences for passing/failing a > testcase. – In principle, it is supposed to *pass* with ENABLE_OFFLOAD > but until the PR is fixed, XFAIL those test cases. > > OK for the trunk and GCC 10? > (The patches causing the to-be-xfailed issue will be backported.) OK, thanks. Reviewed-by: Thomas Schwinge <tho...@codesourcery.com> > --- a/gcc/testsuite/lib/target-supports.exp > +++ b/gcc/testsuite/lib/target-supports.exp > @@ -997,6 +997,12 @@ proc check_effective_target_fgraphite {} { > } "-O1 -fgraphite"] > } > > +# Return 1 if compiled with --enable-offload-targets= > +# This affects host compilation as ENABLE_OFFLOAD then evaluates to true. > +proc check_effective_target_offloading_enabled {} { > + return [check_configured_with "--enable-offload-targets"] Ah, nice and easy! :-) Eh, actually too easy, strictly speaking: we'd need to 'return 0' if (only!) configured with '--enable-offload-targets=hsa'. But, as Martin Jambor recently has gotten approved his "Request to deprecate offloading to HSAIL in GCC", we probably don't have to worry about that now. > +} > + > # Return 1 if compilation with -fopenacc is error-free for trivial > # code, 0 otherwise. > Grüße Thomas ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter