Nested OpenACC/OpenMP constructs (was: OpenACC GIMPLE_OACC_* -- or not?)
Jakub Jelinek
jakub@redhat.com
Wed Dec 10 10:16:00 GMT 2014
On Wed, Dec 10, 2014 at 11:10:19AM +0100, Thomas Schwinge wrote:
> --- /dev/null
> +++ gcc/testsuite/c-c++-common/gomp/nesting-1.c
> @@ -0,0 +1,77 @@
> +void
> +f_omp_parallel (void)
> +{
> +#pragma omp parallel
> + {
> + int i;
Can you please use a global variable declared outside of
f_omp_parallel instead?
> +
> +#pragma omp parallel
> + ;
> +
> +#pragma omp target
> + ;
> +
> +#pragma omp target data
> + ;
> +
> +#pragma omp target update to(i)
The thing is, if GCC tried harder, it could complain here,
because i can't really be mapped at this point and thus it would be always
undefined behavior. If the var is global, it is possible
somebody uses
#pragma omp target map(i)
f_omp_parallel ();
and then it would be valid. Similarly in other tests.
Otherwise LGTM.
Jakub
More information about the Gcc-patches
mailing list