This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/63979] New: [openacc] undefined reference to main._omp_fn.x
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 19 Nov 2014 20:02:58 +0000
- Subject: [Bug other/63979] New: [openacc] undefined reference to main._omp_fn.x
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63979
Bug ID: 63979
Summary: [openacc] undefined reference to main._omp_fn.x
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: vries at gcc dot gnu.org
Created attachment 34041
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34041&action=edit
asyncwait-2.c
When compiling an openacc test-case with the gomp-4_0-branch, I run into:
...
$ ./lean-c/install/bin/gcc asyncwait-2.c -fopenacc -flto --param
lto-min-partition=900
/tmp/ccRhKrwN.ltrans0.ltrans.o:(__gnu_offload_funcs+0x0): undefined reference
to `main._omp_fn.20'
/tmp/ccRhKrwN.ltrans0.ltrans.o:(__gnu_offload_funcs+0x8): undefined reference
to `main._omp_fn.19'
/tmp/ccRhKrwN.ltrans1.ltrans.o: In function `main':
ccRhKrwN.ltrans1.o:(.text+0xe19): undefined reference to `cuStreamCreate'
collect2: error: ld returned 1 exit status
...
Note that I'm using patch
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00085.html on top of
gomp-4_0-branch, otherwise any openacc testcase will fail in lto when
processing openacc builtins.