]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: implement vector sections in DATA statements [PR49588]
authorHarald Anlauf <anlauf@gmx.de>
Mon, 21 Aug 2023 19:23:57 +0000 (21:23 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Tue, 22 Aug 2023 07:44:33 +0000 (09:44 +0200)
commitd3b5a1bccc219680dc19281b6fd6cc798bb679eb
treedb4ef44ebae51cdd76d678922828520b40a55d66
parentc27f06260b248062c3b22f3963858ce3e1ee1882
Fortran: implement vector sections in DATA statements [PR49588]

gcc/fortran/ChangeLog:

PR fortran/49588
* data.cc (gfc_advance_section): Derive next index set and next offset
into DATA variable also for array references using vector sections.
Use auxiliary array to keep track of offsets into indexing vectors.
(gfc_get_section_index): Set up initial indices also for DATA variables
with array references using vector sections.
* data.h (gfc_get_section_index): Adjust prototype.
(gfc_advance_section): Likewise.
* resolve.cc (check_data_variable): Pass vector offsets.

gcc/testsuite/ChangeLog:

PR fortran/49588
* gfortran.dg/data_vector_section.f90: New test.
gcc/fortran/data.cc
gcc/fortran/data.h
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/data_vector_section.f90 [new file with mode: 0644]