aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/parse.cc
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@baylibre.com>2024-04-10 10:20:22 +0200
committerThomas Schwinge <tschwinge@baylibre.com>2024-04-10 10:20:22 +0200
commit0ba53bfa815ad64c834ad726a8cf81d7acf1c49f (patch)
tree24022ee13edfd7804bb28fd9502960f91a7a1d6e /gcc/fortran/parse.cc
parentedd018d8c7b7a0229e10430ee61ac50f390670c2 (diff)
parentee0717da1eb5dc5d17dcd0b35c88c99281385280 (diff)
downloadgcc-0ba53bfa815ad64c834ad726a8cf81d7acf1c49f.zip
gcc-0ba53bfa815ad64c834ad726a8cf81d7acf1c49f.tar.gz
gcc-0ba53bfa815ad64c834ad726a8cf81d7acf1c49f.tar.bz2
Merge commit 'fc59a3995cb46c190c0efb0431ad204e399975c4^' into HEAD
Diffstat (limited to 'gcc/fortran/parse.cc')
-rw-r--r--gcc/fortran/parse.cc34
1 files changed, 29 insertions, 5 deletions
diff --git a/gcc/fortran/parse.cc b/gcc/fortran/parse.cc
index d8b38cf..98a04e7 100644
--- a/gcc/fortran/parse.cc
+++ b/gcc/fortran/parse.cc
@@ -5307,27 +5307,51 @@ parse_do_block (void)
do_op = new_st.op;
s.ext.end_do_label = new_st.label1;
- if (new_st.ext.iterator != NULL)
+ if (do_op == EXEC_DO_CONCURRENT)
+ {
+ gfc_forall_iterator *fa;
+ for (fa = new_st.ext.forall_iterator; fa; fa = fa->next)
+ {
+ /* Apply unroll only to innermost loop (first control
+ variable). */
+ if (directive_unroll != -1)
+ {
+ fa->annot.unroll = directive_unroll;
+ directive_unroll = -1;
+ }
+ if (directive_ivdep)
+ fa->annot.ivdep = directive_ivdep;
+ if (directive_vector)
+ fa->annot.vector = directive_vector;
+ if (directive_novector)
+ fa->annot.novector = directive_novector;
+ }
+ directive_ivdep = false;
+ directive_vector = false;
+ directive_novector = false;
+ stree = NULL;
+ }
+ else if (new_st.ext.iterator != NULL)
{
stree = new_st.ext.iterator->var->symtree;
if (directive_unroll != -1)
{
- new_st.ext.iterator->unroll = directive_unroll;
+ new_st.ext.iterator->annot.unroll = directive_unroll;
directive_unroll = -1;
}
if (directive_ivdep)
{
- new_st.ext.iterator->ivdep = directive_ivdep;
+ new_st.ext.iterator->annot.ivdep = directive_ivdep;
directive_ivdep = false;
}
if (directive_vector)
{
- new_st.ext.iterator->vector = directive_vector;
+ new_st.ext.iterator->annot.vector = directive_vector;
directive_vector = false;
}
if (directive_novector)
{
- new_st.ext.iterator->novector = directive_novector;
+ new_st.ext.iterator->annot.novector = directive_novector;
directive_novector = false;
}
}