diff options
author | Harald Anlauf <anlauf@gmx.de> | 2023-08-21 21:23:57 +0200 |
---|---|---|
committer | Harald Anlauf <anlauf@gmx.de> | 2023-08-22 09:44:33 +0200 |
commit | d3b5a1bccc219680dc19281b6fd6cc798bb679eb (patch) | |
tree | db4ef44ebae51cdd76d678922828520b40a55d66 /gcc/fortran/data.h | |
parent | c27f06260b248062c3b22f3963858ce3e1ee1882 (diff) | |
download | gcc-d3b5a1bccc219680dc19281b6fd6cc798bb679eb.zip gcc-d3b5a1bccc219680dc19281b6fd6cc798bb679eb.tar.gz gcc-d3b5a1bccc219680dc19281b6fd6cc798bb679eb.tar.bz2 |
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.
Diffstat (limited to 'gcc/fortran/data.h')
-rw-r--r-- | gcc/fortran/data.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/data.h b/gcc/fortran/data.h index 40dbee1..8f2013a 100644 --- a/gcc/fortran/data.h +++ b/gcc/fortran/data.h @@ -18,6 +18,6 @@ along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ void gfc_formalize_init_value (gfc_symbol *); -void gfc_get_section_index (gfc_array_ref *, mpz_t *, mpz_t *); +void gfc_get_section_index (gfc_array_ref *, mpz_t *, mpz_t *, int *); bool gfc_assign_data_value (gfc_expr *, gfc_expr *, mpz_t, mpz_t *); -void gfc_advance_section (mpz_t *, gfc_array_ref *, mpz_t *); +void gfc_advance_section (mpz_t *, gfc_array_ref *, mpz_t *, int *); |