From: Tobias Burnus Date: Fri, 29 Nov 2019 13:49:44 +0000 (+0100) Subject: Fortran] OpenACC – permit common blocks in some clauses X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af814dfa9b6e3e598bbcf2ee4615aae0e886fef4;p=gcc.git Fortran] OpenACC – permit common blocks in some clauses * fortran.dg/goacc/common-block-3.f90: Check that unused common-block variables do not get mapped. Reviewed-by: Thomas Schwinge From-SVN: r278843 --- 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" } }