public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Nested OpenACC/OpenMP constructs (was: OpenACC GIMPLE_OACC_* -- or not?)
Date: Wed, 10 Dec 2014 10:16:00 -0000	[thread overview]
Message-ID: <20141210101608.GA1667@tucnak.redhat.com> (raw)
In-Reply-To: <87iohj7r3o.fsf@kepler.schwinge.homeip.net>

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

  reply	other threads:[~2014-12-10 10:16 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06 19:44 Initial submission of OpenACC support integrated into OpenMP's lowering and expansion passes Thomas Schwinge
2013-11-06 19:44 ` [gomp4 1/9] Add missing include thomas
2013-11-06 19:44   ` [gomp4 2/9] libgomp: Prepare for testcases without -fopenmp thomas
2013-11-06 19:47     ` [gomp4 3/9] OpenACC: Recognize -fopenacc thomas
2013-11-06 20:39       ` [gomp4 4/9] OpenACC: The runtime library will be implemented in libgomp, too thomas
2013-11-06 19:45         ` [gomp4 5/9] OpenACC: preprocessor definition, Fortran integer parameter thomas
2013-11-06 20:37           ` [gomp4 6/9] OpenACC: Infrastructure for builtins thomas
2013-11-06 19:56             ` [gomp4 7/9] OpenACC: Use OpenMP's lowering and expansion passes thomas
2013-11-06 20:29               ` [gomp4 8/9] OpenACC: Basic support for #pragma acc in the C front end thomas
2013-11-06 19:53                 ` [gomp4 9/9] OpenACC: Basic support for #pragma acc parallel thomas
2013-11-06 20:01                   ` Thomas Schwinge
2013-11-07  8:48                     ` Jakub Jelinek
2014-02-27 19:58                     ` [gomp4] Gimplification: Merge gimplify_oacc_parallel into gimplify_omp_workshare. (was: [gomp4 9/9] OpenACC: Basic support for #pragma acc parallel.) Thomas Schwinge
2014-03-20 14:28                     ` [gomp4 9/9] OpenACC: Basic support for #pragma acc parallel Thomas Schwinge
2014-11-12 13:35                     ` OpenACC GIMPLE_OACC_* -- or not? (was: [gomp4 9/9] OpenACC: Basic support for #pragma acc parallel.) Thomas Schwinge
2014-11-12 13:46                       ` Jakub Jelinek
2014-12-10  9:58                         ` OpenACC GIMPLE_OACC_* -- or not? Thomas Schwinge
2014-12-10 10:07                           ` Thomas Schwinge
2014-12-10 10:10                             ` Jakub Jelinek
2014-12-12 20:02                               ` Thomas Schwinge
2014-12-10 10:02                         ` Nested OpenACC/OpenMP constructs (was: OpenACC GIMPLE_OACC_* -- or not?) Thomas Schwinge
2014-12-10 10:10                           ` Thomas Schwinge
2014-12-10 10:16                             ` Jakub Jelinek [this message]
2014-12-12 20:04                               ` Nested OpenACC/OpenMP constructs Thomas Schwinge
2014-12-17 22:21                                 ` OpenACC/OpenMP testing: Revise variable usage in constructs (was: Nested OpenACC/OpenMP constructs) Thomas Schwinge
2013-11-06 20:03                   ` [gomp4 9/9] OpenACC: Basic support for #pragma acc parallel Jakub Jelinek
2013-11-07 19:00                     ` Thomas Schwinge
2013-11-07  8:41                 ` [gomp4 8/9] OpenACC: Basic support for #pragma acc in the C front end Jakub Jelinek
2013-11-07  8:39               ` [gomp4 7/9] OpenACC: Use OpenMP's lowering and expansion passes Jakub Jelinek
2013-11-07  8:23             ` [gomp4 6/9] OpenACC: Infrastructure for builtins Jakub Jelinek
2013-11-07  8:19           ` [gomp4 5/9] OpenACC: preprocessor definition, Fortran integer parameter Jakub Jelinek
2013-11-07  8:18         ` [gomp4 4/9] OpenACC: The runtime library will be implemented in libgomp, too Jakub Jelinek
2013-11-07 14:05           ` Generally link to libgomp for -ftree-parallelize-loops=* (was: [gomp4 4/9] OpenACC: The runtime library will be implemented in libgomp, too.) Thomas Schwinge
2013-11-07 14:48             ` Jakub Jelinek
2013-11-07  8:17       ` [gomp4 3/9] OpenACC: Recognize -fopenacc Jakub Jelinek
2013-11-07  8:16     ` [gomp4 2/9] libgomp: Prepare for testcases without -fopenmp Jakub Jelinek
2017-09-28  7:41       ` [libgomp, testsuite] Remove superfluous -fopenmp from libgomp testcases Tom de Vries
2017-09-28  8:37         ` Thomas Schwinge
2017-09-28 12:12           ` Tom de Vries
2017-09-28  8:46         ` Jakub Jelinek
2013-11-07  8:15   ` [gomp4 1/9] Add missing include Jakub Jelinek
2013-11-07 18:14 ` Initial submission of OpenACC support integrated into OpenMP's lowering and expansion passes Evgeny Gavrin
2013-11-27 23:23   ` Thomas Schwinge
     [not found]   ` <004b01cedc68$a5f3c950$f1db5bf0$%b@samsung.com>
2013-11-27 23:25     ` Thomas Schwinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141210101608.GA1667@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).