public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/63246] New: OpenMP target: gimplifier produces unsuitable implicit map clauses if inside a data region
@ 2014-09-12 17:24 tschwinge at gcc dot gnu.org
  2014-09-12 18:49 ` [Bug middle-end/63246] " jakub at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2014-09-12 17:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63246

            Bug ID: 63246
           Summary: OpenMP target: gimplifier produces unsuitable implicit
                    map clauses if inside a data region
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: openmp
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org

Consider:

    int
    main(int argc, char **argv)
    {
    #define N 4
        short a[N];

    #pragma omp target data map(a[1:N-1])
        {
    #pragma omp target
          {
            a[1] = 51;
          }
        }

        return 0;
    }

..., which results in the following gimple:

    [...]
          #pragma omp target data map(tofrom:a[1] [len: 6]) map(alloc:a
[pointer assign, bias: 2])
            {
              try
                {
                  {
                    #pragma omp target map(tofrom:a [len: 8])
                      {
                        {
                          a[1] = 51;
    [...]

The outer data region sets up an expicit mapping for a subset of the array, and
the inner target construct then again gets an implicit map clause added for
*the whole* region.  A suitably equipped libgomp (for example, gomp-4_0-branch
with the non-shared memory host plugin) doesn't like this:

    libgomp: Trying to map into device [0x7fff6f513410..0x7fff6f513418) object
when[0x7fff6f513412..0x7fff6f513418) is already mapped


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-12 18:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-12 17:24 [Bug middle-end/63246] New: OpenMP target: gimplifier produces unsuitable implicit map clauses if inside a data region tschwinge at gcc dot gnu.org
2014-09-12 18:49 ` [Bug middle-end/63246] " jakub at gcc dot gnu.org

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).