[committed] libgomp.c++/static-aggr-constructor-destructor-{1,2}.C: Fix scan-tree-dump (was: [r15-2799 Regression] FAIL: libgomp.c++/static-aggr-constructor-destructor-2.C scan-tree-dump-times optimized "void _GLOBAL__off_I_" 1 on Linux/x86_64)

Tobias Burnus tburnus@baylibre.com
Thu Aug 8 08:54:06 GMT 2024


haochen.jiang wrote:
> FAIL: libgomp.c++/static-aggr-constructor-destructor-1.C scan-tree-dump-times optimized "__attribute__\\(\\([^\n\r]*omp declare target nohost" 1
> FAIL: libgomp.c++/static-aggr-constructor-destructor-1.C scan-tree-dump-times optimized "void _GLOBAL__off_I_v1" 1

Those symbols are generated even with ENABLE_OFFLOADING == false, but in 
that case they are optimized way (as they should).

With offloading, the pass removing them comes too late, but we should 
handle 'nohost' explicitly. Once done, the dump will be the same (no 
symbol). Until this implemented, we now do:

To make this test pass, we now use 'target (!) offload_target_any' to 
separate the cases, even though offload_target_any does not completely 
match ENABLE_OFFLOADING.*

Committed as r15-2814-ge3a6dec326a127

Tobias

(* If you configured with --enable-offload-defaulted and have no offload 
binaries available or when you smuggle '-foffload=disable' to the 
commandline, ENABLE_OFFLOADING is true while offload_target_any is false.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: committed.diff
Type: text/x-patch
Size: 4936 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-regression/attachments/20240808/245d6387/attachment-0001.bin>


More information about the Gcc-regression mailing list