From af814dfa9b6e3e598bbcf2ee4615aae0e886fef4 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Fri, 29 Nov 2019 14:49:44 +0100 Subject: [PATCH] =?utf8?q?Fortran]=20OpenACC=20=E2=80=93=20permit=20common?= =?utf8?q?=20blocks=20in=20some=20clauses?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * fortran.dg/goacc/common-block-3.f90: Check that unused common-block variables do not get mapped. Reviewed-by: Thomas Schwinge From-SVN: r278843 --- gcc/testsuite/ChangeLog | 7 ++++++- gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 | 11 ++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f7a173e15d2..a096fa635f1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,7 +1,12 @@ +2019-11-29 Tobias Burnus + + * fortran.dg/goacc/common-block-3.f90: Check that unused common-block + variables do not get mapped. + 2019-11-29 Martin Jambor PR ipa/92476 - * g++.dg/lto/pr92476_[01].C: New test. + * g++.dg/lto/pr92476_[01].C: New test. 2019-11-29 Richard Sandiford diff --git a/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 b/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 index 9032d9331f0..5defe2ea85d 100644 --- a/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 +++ b/gcc/testsuite/gfortran.dg/goacc/common-block-3.f90 @@ -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" } } -- 2.30.2