public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-9471] Minor fixes for OpenACC/Fortran 'self' clause for compute constructs
@ 2024-03-14 14:44 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2024-03-14 14:44 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:473c6123ffad38dddef7b126bf97971784d94b40
commit r14-9471-g473c6123ffad38dddef7b126bf97971784d94b40
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Fri Oct 20 15:49:35 2023 +0200
Minor fixes for OpenACC/Fortran 'self' clause for compute constructs
... to fix up recent commit 3a3596389c2e539cb8fd5dc5784a4e2afe193a2a
"OpenACC 2.7: Implement self clause for compute constructs".
gcc/fortran/
* dump-parse-tree.cc (show_omp_clauses): Handle 'self_expr'.
* openmp.cc (gfc_free_omp_clauses): Likewise.
* trans-openmp.cc (gfc_split_omp_clauses): Don't handle 'self_expr'.
Diff:
---
gcc/fortran/dump-parse-tree.cc | 6 ++++++
gcc/fortran/openmp.cc | 1 +
gcc/fortran/trans-openmp.cc | 2 --
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc
index db84b06289b..7bc78663768 100644
--- a/gcc/fortran/dump-parse-tree.cc
+++ b/gcc/fortran/dump-parse-tree.cc
@@ -1619,6 +1619,12 @@ show_omp_clauses (gfc_omp_clauses *omp_clauses)
show_expr (omp_clauses->if_exprs[i]);
fputc (')', dumpfile);
}
+ if (omp_clauses->self_expr)
+ {
+ fputs (" SELF(", dumpfile);
+ show_expr (omp_clauses->self_expr);
+ fputc (')', dumpfile);
+ }
if (omp_clauses->final_expr)
{
fputs (" FINAL(", dumpfile);
diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc
index 5c44e666eb9..315ec68f259 100644
--- a/gcc/fortran/openmp.cc
+++ b/gcc/fortran/openmp.cc
@@ -164,6 +164,7 @@ gfc_free_omp_clauses (gfc_omp_clauses *c)
gfc_free_expr (c->if_expr);
for (i = 0; i < OMP_IF_LAST; i++)
gfc_free_expr (c->if_exprs[i]);
+ gfc_free_expr (c->self_expr);
gfc_free_expr (c->final_expr);
gfc_free_expr (c->num_threads);
gfc_free_expr (c->chunk_size);
diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc
index 7a088ec5b2d..f867e2240bf 100644
--- a/gcc/fortran/trans-openmp.cc
+++ b/gcc/fortran/trans-openmp.cc
@@ -6840,8 +6840,6 @@ gfc_split_omp_clauses (gfc_code *code,
/* And this is copied to all. */
clausesa[GFC_OMP_SPLIT_TARGET].if_expr
= code->ext.omp_clauses->if_expr;
- clausesa[GFC_OMP_SPLIT_TARGET].self_expr
- = code->ext.omp_clauses->self_expr;
clausesa[GFC_OMP_SPLIT_TARGET].nowait
= code->ext.omp_clauses->nowait;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-14 14:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-14 14:44 [gcc r14-9471] Minor fixes for OpenACC/Fortran 'self' clause for compute constructs Thomas Schwinge
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).