[PATCH, PR69607] Mark offload symbols as global in lto

Tom de Vries Tom_deVries@mentor.com
Wed Feb 17 12:03:00 GMT 2016


On 08/02/16 14:00, Tom de Vries wrote:
> Hi,
>
> when running libgomp.c testsuite with "-flto -flto-partition=1to1
> -fno-toplevel-reorder" we run into many compilation failures like this:
> ...
> /tmp/xxxxxxxx.ltrans0.ltrans.o:(.gnu.offload_funcs+0x1a0): undefined
> reference to `MAIN__._omp_fn.0'^M
> ...
>
> The problem is that the offload table is in one lto partition, and the
> function listed in the offload table is in another, without the function
> having been promoted to be visible in the other partition.
>
> The patch fixes this by promoting the symbols in the offload table such
> that they're visible in all partitions.
>
> Bootstrapped and reg-tested on x86_64.
>
> Build for nvidia accelerator and reg-tested libgomp with various lto
> settings.
>

Added multi-source testcase target-3{7,8}.c that triggers the PR for 
intelmicemul accelerator.

OK for trunk, stage1 (or stage4, if that's appropriate)?

Thanks,
- Tom

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Mark-offload-symbols-as-global-in-lto.patch
Type: text/x-patch
Size: 8045 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160217/2828fad1/attachment.bin>


More information about the Gcc-patches mailing list