Re: [PATCH][OpenMP] Fix declare target variables in fortran modules

2015-03-12 Thread Jakub Jelinek
On Thu, Mar 12, 2015 at 10:22:37PM +0300, Ilya Verbin wrote: > On Thu, Mar 12, 2015 at 15:21:35 +0100, Jakub Jelinek wrote: > > On Thu, Mar 12, 2015 at 04:56:35PM +0300, Ilya Verbin wrote: > > > This happens because the var_x is added into offload tables for both > > > share.o and > > > test.o. T

Re: [PATCH][OpenMP] Fix declare target variables in fortran modules

2015-03-12 Thread Ilya Verbin
On Thu, Mar 12, 2015 at 15:21:35 +0100, Jakub Jelinek wrote: > On Thu, Mar 12, 2015 at 04:56:35PM +0300, Ilya Verbin wrote: > > This happens because the var_x is added into offload tables for both > > share.o and > > test.o. The patch below fixes this issue. Regtested on x86_64-linux and > > i68

Re: [PATCH][OpenMP] Fix declare target variables in fortran modules

2015-03-12 Thread Jakub Jelinek
On Thu, Mar 12, 2015 at 04:56:35PM +0300, Ilya Verbin wrote: > This happens because the var_x is added into offload tables for both share.o > and > test.o. The patch below fixes this issue. Regtested on x86_64-linux and > i686-linux. However I'm not sure how to create a regression test, which w

[PATCH][OpenMP] Fix declare target variables in fortran modules

2015-03-12 Thread Ilya Verbin
Hi, We have a problem with declare target variables in fortran modules, here is a small reproducer: + share.f90: module share integer :: var_x !$omp declare target(var_x) end module + test.f90: use share var_x = 10 !$omp target update to(var_x) end + $ gfortran -fopenmp -c