]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Merge remote-tracking branch 'origin/releases/gcc-10' into devel/omp/gcc-10
authorTobias Burnus <tobias@codesourcery.com>
Tue, 14 Jul 2020 09:29:09 +0000 (11:29 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 14 Jul 2020 09:29:09 +0000 (11:29 +0200)
Merge up to bafecb520a5563936750b117f5416d13a9159590 (June 30, 2020)

18 files changed:
1  2 
gcc/c-family/c-common.c
gcc/c/c-typeck.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/doc/invoke.texi
gcc/doc/sourcebuild.texi
gcc/expr.c
gcc/fortran/gfortran.h
gcc/fortran/trans-decl.c
gcc/fortran/trans-openmp.c
gcc/fortran/trans-stmt.c
gcc/testsuite/lib/target-supports.exp
include/gomp-constants.h
libgomp/oacc-mem.c
libgomp/target.c

Simple merge
Simple merge
Simple merge
diff --cc gcc/cp/decl.c
Simple merge
diff --cc gcc/cp/parser.c
Simple merge
diff --cc gcc/cp/pt.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc gcc/expr.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 534d8d51e50d3f08be587ade4291f1ae2f9bc27f,7e44238ae03e07ed154b823f9b30b1bf97b0727e..02a4c429adfdd52740a537453eb9f1779cf566f5
@@@ -137,12 -139,12 +140,17 @@@ enum gomp_map_kin
      /* Decrement usage count and deallocate if zero.  */
      GOMP_MAP_RELEASE =                        (GOMP_MAP_FLAG_SPECIAL_2
                                         | GOMP_MAP_DELETE),
-     /* In OpenACC, attach a pointer to a mapped struct field.  */
 +    /* Mapping kinds for allocatable arrays.  */
 +    GOMP_MAP_DECLARE_ALLOCATE =               (GOMP_MAP_FLAG_SPECIAL_4
 +                                       | GOMP_MAP_FORCE_TO),
 +    GOMP_MAP_DECLARE_DEALLOCATE =     (GOMP_MAP_FLAG_SPECIAL_4
 +                                       | GOMP_MAP_FORCE_FROM),
+     /* The attach/detach mappings below use the OMP_CLAUSE_SIZE field as a
+        bias.  This will typically be zero, except when mapping an array slice
+        with a non-zero base.  In that case the bias will indicate the
+        (positive) difference between the start of the actual mapped data and
+        the "virtual" origin of the array.
+        In OpenACC, attach a pointer to a mapped struct field.  */
      GOMP_MAP_ATTACH =                 (GOMP_MAP_DEEP_COPY | 0),
      /* In OpenACC, detach a pointer to a mapped struct field.  */
      GOMP_MAP_DETACH =                 (GOMP_MAP_DEEP_COPY | 1),
index 01addd2cf628d9e97cb3b00995fd17f307dbfb99,34f519a2045292736fca82a90e9368c84e453a85..884a81b7a050e170ff4011303545f76c6a2d4177
@@@ -1031,28 -1030,9 +1059,31 @@@ find_group_last (int pos, size_t mapnum
        gomp_fatal ("unexpected mapping");
        break;
  
 +    case GOMP_MAP_DECLARE_ALLOCATE:
 +    case GOMP_MAP_DECLARE_DEALLOCATE:
 +      {
 +      /* The "declare allocate" and "declare deallocate" mappings can be
 +         used to specify either a scalar allocatable (which just appears as
 +         GOMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE} by itself), or an array
 +         allocatable (which appears as that directive followed by a
 +         GOMP_MAP_TO_PSET and one (or more?) GOMP_MAP_POINTER mappings.  */
 +      if (pos + 1 >= mapnum)
 +        break;
 +
 +      unsigned char kind1 = kinds[pos + 1] & 0xff;
 +      if (kind1 != GOMP_MAP_TO_PSET)
 +        break;
 +
 +      pos++;
 +
 +      while (pos + 1 < mapnum && (kinds[pos + 1] & 0xff) == GOMP_MAP_POINTER)
 +        pos++;
 +      }
 +      break;
 +
+     case GOMP_MAP_ATTACH:
+       break;
      default:
        /* GOMP_MAP_ALWAYS_POINTER can only appear directly after some other
         mapping.  */
index 696cda820e58eae475f495cd9293760839a9d03c,d4a4a408b400efde3c089d55305c4dfc1dd64cc5..d9a219b42447515cf68a9a3517733971ef35f5f3
@@@ -1005,31 -816,8 +1007,30 @@@ gomp_map_vars_internal (struct gomp_dev
          has_firstprivate = true;
          continue;
        }
 +      else if (GOMP_MAP_NONCONTIG_ARRAY_P (kind & typemask))
 +      {
 +        /* Ignore non-contiguous arrays for now, we process them together
 +           later.  */
 +        tgt->list[i].key = NULL;
 +        tgt->list[i].offset = 0;
 +        not_found_cnt++;
 +
 +        /* The map for the non-contiguous array itself is never copied from
 +           during unmapping, its the data rows that count. Set copy-from
 +           flags to false here.  */
 +        tgt->list[i].copy_from = false;
 +        tgt->list[i].always_copy_from = false;
 +        tgt->list[i].do_detach = false;
 +
 +        size_t align = (size_t) 1 << (kind >> rshift);
 +        if (tgt_align < align)
 +          tgt_align = align;
 +
 +        continue;
 +      }
 +
        cur_node.host_start = (uintptr_t) hostaddrs[i];
-       if (!GOMP_MAP_POINTER_P (kind & typemask)
-         && (kind & typemask) != GOMP_MAP_ATTACH)
+       if (!GOMP_MAP_POINTER_P (kind & typemask))
        cur_node.host_end = cur_node.host_start + sizes[i];
        else
        cur_node.host_end = cur_node.host_start + sizeof (void *);