public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, committed] Fortran/OpenMP: Add missing EXEC_OMP_DEPOBJ case val [PR100642]
@ 2021-05-18 14:46 Tobias Burnus
  0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2021-05-18 14:46 UTC (permalink / raw)
  To: gcc-patches, fortran

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

Committed as r12-881-gcc193ac840d58ee0ffb57b14b542706cde3db0e7

I have done grepping and think that EXEC_OMP_DEPOBJ was the only one
missing.
(All ..._END_... are also missing but I think needed.)

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf

[-- Attachment #2: committed.diff --]
[-- Type: text/x-patch, Size: 1534 bytes --]

commit cc193ac840d58ee0ffb57b14b542706cde3db0e7
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Tue May 18 16:40:45 2021 +0200

    Fortran/OpenMP: Add missing EXEC_OMP_DEPOBJ case val [PR100642]
    
            PR fortran/100642
    
    gcc/fortran/ChangeLog:
    
            * openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
    
    gcc/testsuite/ChangeLog:
    
            * gfortran.dg/goacc-gomp/depobj.f90: New test.

diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 294b6d05506..005b6c12d98 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -6902,7 +6902,8 @@ omp_code_to_statement (gfc_code *code)
       return ST_OMP_PARALLEL_DO;
     case EXEC_OMP_PARALLEL_DO_SIMD:
       return ST_OMP_PARALLEL_DO_SIMD;
-
+    case EXEC_OMP_DEPOBJ:
+      return ST_OMP_DEPOBJ;
     default:
       gcc_unreachable ();
     }
diff --git a/gcc/testsuite/gfortran.dg/goacc-gomp/depobj.f90 b/gcc/testsuite/gfortran.dg/goacc-gomp/depobj.f90
new file mode 100644
index 00000000000..e1c683000f5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goacc-gomp/depobj.f90
@@ -0,0 +1,11 @@
+! PR fortran/100642
+! Contributed by G. Steinmetz
+program p
+   !use omp_lib, only: omp_depend_kind
+   use iso_c_binding, only: c_intptr_t
+   integer, parameter :: omp_depend_kind = 2*c_intptr_t
+   integer(omp_depend_kind) :: a, b
+   !$acc data
+   !$omp depobj(b) depend(out:a)  ! { dg-error "The !\\\$OMP DEPOBJ directive cannot be specified within a !\\\$ACC DATA region" }
+   !$acc end data
+end

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-18 14:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 14:46 [Patch, committed] Fortran/OpenMP: Add missing EXEC_OMP_DEPOBJ case val [PR100642] Tobias Burnus

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