Fortran] OpenACC – permit common blocks in some clauses
authorTobias Burnus <burnus@gcc.gnu.org>
Fri, 29 Nov 2019 13:49:44 +0000 (14:49 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Fri, 29 Nov 2019 13:49:44 +0000 (14:49 +0100)
        * fortran.dg/goacc/common-block-3.f90: Check that unused common-block
        variables do not get mapped.

Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
From-SVN: r278843

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/goacc/common-block-3.f90

index f7a173e15d25c77bfaab9aad284030f748f3e745..a096fa635f19c8738a52b23cb5765a4f9a946bf5 100644 (file)
@@ -1,7 +1,12 @@
+2019-11-29 Tobias Burnus  <tobias@codesourcery.com>
+
+       * fortran.dg/goacc/common-block-3.f90: Check that unused common-block
+       variables do not get mapped.
+
 2019-11-29  Martin Jambor  <mjambor@suse.cz>
 
        PR ipa/92476
-        * g++.dg/lto/pr92476_[01].C: New test.
+       * g++.dg/lto/pr92476_[01].C: New test.
 
 2019-11-29  Richard Sandiford  <richard.sandiford@arm.com>
 
index 9032d9331f07932c7948fb967a93d1e822e6e397..5defe2ea85deb953e771b91652433a7cd73b7122 100644 (file)
@@ -9,7 +9,7 @@ program main
   implicit none
 
   integer :: i, j
-  real ::  a(n) = 0, b(n) = 0, c, d
+  real ::  a(n) = 0, b(n) = 0, c, d, e(n)
   real ::  x(n) = 0, y(n), z
   common /BLOCK/ a, b, c, j, d
   common /KERNELS_BLOCK/ x, y, z
@@ -35,5 +35,10 @@ end program main
 ! { dg-final { scan-tree-dump-times "omp target oacc_kernels .*map\\(tofrom:y \\\[len: 400\\\]\\\)" 1 "omplower" } }
 ! { dg-final { scan-tree-dump-times "omp target oacc_kernels .*map\\(force_tofrom:c \\\[len: 4\\\]\\)" 1 "omplower" } }
 
-! { dg-final { scan-tree-dump-not "map\\(.*:block\\)" "omplower" } }
-! { dg-final { scan-tree-dump-not "map\\(.*:kernels_block\\)" "omplower" } }
+! Expecting no mapping of un-referenced common-blocks variables
+
+! { dg-final { scan-tree-dump-not "map\\(.*:block" "omplower" } }
+! { dg-final { scan-tree-dump-not "map\\(.*:kernels_block" "omplower" } }
+! { dg-final { scan-tree-dump-not "map\\(.*:d " "omplower" } }
+! { dg-final { scan-tree-dump-not "map\\(.*:e " "omplower" } }
+! { dg-final { scan-tree-dump-not "map\\(.*:z " "omplower" } }