Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-22 Thread Rainer Orth
Hi Jakub, >> the patch also breaks bootstrap on both i386-pc-solaris2.11 and >> sparc-sun-solaris2.11: >> >> /vol/gcc/src/hg/master/local/libgomp/env.c: In function 'initialize_env': >> /vol/gcc/src/hg/master/local/libgomp/env.c:414:16: error: 'new_offload' >> may be used uninitialized in this

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Kwok Cheung Yeung
On 20/10/2020 1:57 pm, Jakub Jelinek wrote: On Tue, Oct 20, 2020 at 02:17:26PM +0200, Tobias Burnus wrote: On 10/20/20 2:11 PM, Tobias Burnus wrote: Unfortunately, the committed patch (r11-4121-g1bfc07d150790fae93184a79a7cce897655cb37b) causes build errors. The error seems to be provoked by

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 20, 2020 at 06:39:39PM +0200, Rainer Orth wrote: > Hi Tobias, > > > On 10/19/20 8:21 PM, Jakub Jelinek via Gcc-patches wrote: > > > >> On Mon, Oct 19, 2020 at 06:57:49PM +0100, Kwok Cheung Yeung wrote: > >>> --- a/libgomp/target.c > >>> +++ b/libgomp/target.c > > ... > >> Otherwise

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Rainer Orth
Hi Tobias, > On 10/19/20 8:21 PM, Jakub Jelinek via Gcc-patches wrote: > >> On Mon, Oct 19, 2020 at 06:57:49PM +0100, Kwok Cheung Yeung wrote: >>> --- a/libgomp/target.c >>> +++ b/libgomp/target.c > ... >> Otherwise LGTM. > > Unfortunately, the committed patch >

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 20, 2020 at 02:17:26PM +0200, Tobias Burnus wrote: > On 10/20/20 2:11 PM, Tobias Burnus wrote: > > > Unfortunately, the committed patch > > (r11-4121-g1bfc07d150790fae93184a79a7cce897655cb37b) > > causes build errors. > > > > The error seems to be provoked by function cloning – as

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Tobias Burnus
On 10/20/20 2:11 PM, Tobias Burnus wrote: Unfortunately, the committed patch (r11-4121-g1bfc07d150790fae93184a79a7cce897655cb37b) causes build errors. The error seems to be provoked by function cloning – as the code itself looks fine: ... struct gomp_device_descr *devices_s = malloc

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-20 Thread Tobias Burnus
On 10/19/20 8:21 PM, Jakub Jelinek via Gcc-patches wrote: On Mon, Oct 19, 2020 at 06:57:49PM +0100, Kwok Cheung Yeung wrote: --- a/libgomp/target.c +++ b/libgomp/target.c ... Otherwise LGTM. Unfortunately, the committed patch (r11-4121-g1bfc07d150790fae93184a79a7cce897655cb37b) causes

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-19 Thread Jakub Jelinek via Gcc-patches
On Mon, Oct 19, 2020 at 06:57:49PM +0100, Kwok Cheung Yeung wrote: > --- a/libgomp/env.c > +++ b/libgomp/env.c > @@ -75,6 +75,7 @@ struct gomp_task_icv gomp_global_icv = { > > unsigned long gomp_max_active_levels_var = gomp_supported_active_levels; > bool gomp_cancel_var = false; > +enum

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-19 Thread Kwok Cheung Yeung
On 15/10/2020 12:02 pm, Jakub Jelinek wrote: On Thu, Oct 15, 2020 at 12:50:18PM +0200, Jakub Jelinek via Gcc-patches wrote: Ok, the first response indicates that both if (false) and omp_get_initial_device () are valid. Therefore, I think until omp_get_initial_device () value is changed, we want

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-15 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 15, 2020 at 12:50:18PM +0200, Jakub Jelinek via Gcc-patches wrote: > If nothing of this is valid (i.e. mandatory forbids all the fallback), then > your patch implements it, but if e.g. only if (false) is allowed and nothing > else, then we are ATM in trouble (we pass -2 for if false as

Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD

2020-10-15 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 14, 2020 at 09:32:42PM +0100, Kwok Cheung Yeung wrote: > I'm not sure how this can be tested automatically, as the behaviour depends > on whether the compiler has been built with offloading support, and whether > any supported offloading hardware has been installed on the system. I