aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/array.cc
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2024-01-12 19:51:11 +0100
committerHarald Anlauf <anlauf@gmx.de>2024-01-13 14:47:24 +0100
commit9935667a69896865b848dfa690f94c9c693a48a3 (patch)
treee137e4230894767233886776cac3ec733b0f75b0 /gcc/fortran/array.cc
parentf8a5298c97c460d45e888b123fe1bbcdb49b8ad4 (diff)
downloadgcc-9935667a69896865b848dfa690f94c9c693a48a3.zip
gcc-9935667a69896865b848dfa690f94c9c693a48a3.tar.gz
gcc-9935667a69896865b848dfa690f94c9c693a48a3.tar.bz2
Fortran: annotations for DO CONCURRENT loops [PR113305]
gcc/fortran/ChangeLog: PR fortran/113305 * gfortran.h (gfc_loop_annot): New. (gfc_iterator, gfc_forall_iterator): Use for annotation control. * array.cc (gfc_copy_iterator): Adjust. * gfortran.texi: Document annotations IVDEP, UNROLL n, VECTOR, NOVECTOR as applied to DO CONCURRENT. * parse.cc (parse_do_block): Parse annotations IVDEP, UNROLL n, VECTOR, NOVECTOR as applied to DO CONCURRENT. Apply UNROLL only to first loop control variable. * trans-stmt.cc (iter_info): Use gfc_loop_annot. (gfc_trans_simple_do): Adjust. (gfc_trans_forall_loop): Annotate loops with IVDEP, UNROLL n, VECTOR, NOVECTOR as needed for DO CONCURRENT. (gfc_trans_forall_1): Handle loop annotations. gcc/testsuite/ChangeLog: PR fortran/113305 * gfortran.dg/do_concurrent_7.f90: New test.
Diffstat (limited to 'gcc/fortran/array.cc')
-rw-r--r--gcc/fortran/array.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/fortran/array.cc b/gcc/fortran/array.cc
index 19456ba..81fa99d 100644
--- a/gcc/fortran/array.cc
+++ b/gcc/fortran/array.cc
@@ -2308,10 +2308,7 @@ gfc_copy_iterator (gfc_iterator *src)
dest->start = gfc_copy_expr (src->start);
dest->end = gfc_copy_expr (src->end);
dest->step = gfc_copy_expr (src->step);
- dest->unroll = src->unroll;
- dest->ivdep = src->ivdep;
- dest->vector = src->vector;
- dest->novector = src->novector;
+ dest->annot = src->annot;
return dest;
}