[Bug c++/82629] OpenMP 4.5 Target Region mangling problem
thorstenkurth at me dot com
gcc-bugzilla@gcc.gnu.org
Fri Oct 20 16:19:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82629
--- Comment #2 from Thorsten Kurth <thorstenkurth at me dot com> ---
Created attachment 42420
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42420&action=edit
This is the test case demonstrating the problem.
Linking this code will produce:
-bash-4.2$ make main.x
g++ -O2 -std=c++11 -fopenmp -foffload=nvptx-none -c aclass.cpp -o aclass.o
g++ -O2 -std=c++11 -fopenmp -foffload=nvptx-none -c bclass.cpp -o bclass.o
g++ aclass.o bclass.o -o main.x
lto1: fatal error: aclass.o: section _ZN6master4copyERKS_$_omp_fn$1 is missing
compilation terminated.
mkoffload: fatal error: powerpc64le-unknown-linux-gnu-accel-nvptx-none-gcc
returned 1 exit status
compilation terminated.
lto-wrapper: fatal error:
/autofs/nccs-svm1_sw/summitdev/gcc/7.1.1-20170802/bin/../libexec/gcc/powerpc64le-unknown-linux-gnu/7.1.1//accel/nvptx-none/mkoffload
returned 1 exit status
compilation terminated.
/usr/bin/ld: lto-wrapper failed
/usr/bin/sha1sum: main.x: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [main.x] Error 1
But looking at the object in question shows:
-bash-4.2$ nm aclass.o
U .TOC.
0000000000000000 d .offload_func_table
0000000000000000 d .offload_var_table
U GOMP_parallel
U GOMP_target_enter_exit_data
U GOMP_target_ext
U GOMP_teams
0000000000000350 T _ZN6aclass4copyERKS_
0000000000000250 T _ZN6aclass8allocateERKj
0000000000000130 t _ZN6master4copyERKS_._omp_fn.0
0000000000000000 t _ZN6master4copyERKS_._omp_fn.1
0000000000000000 d _ZZN6master10deallocateEvE18.omp_data_kinds.20
0000000000000000 b _ZZN6master10deallocateEvE18.omp_data_sizes.19
0000000000000002 d _ZZN6master4copyERKS_E18.omp_data_kinds.11
0000000000000008 d _ZZN6master4copyERKS_E18.omp_data_sizes.10
U _ZdaPv
U _Znam
U __cxa_throw_bad_array_new_length
0000000000000001 C __gnu_lto_v1
U omp_get_num_teams
U omp_get_num_threads
U omp_get_team_num
U omp_get_thread_num
The function is actually there.
Best Regards
Thorsten Kurth
More information about the Gcc-bugs
mailing list