[OG13,committed] OpenMP/Fortran: Fix parsing of metadirectives with BLOCK
Checks
Commit Message
This is an OG13-only patch as metadirectives are not yet on mainline.
I think it is a side effect of the backported my mainline patch that
fixed strictly-nested blocks that was backported to OG13 on Oct 8, 2023
in OG13 commit 36e5f02e64bd4b5b1eaf89993a63c56b01cd4e7c.
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
commit 46feedaddf8e4d82b7a24557c7bb4c8c3ee287a0
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Tue Oct 31 12:03:44 2023 +0100
OpenMP/Fortran: Fix parsing of metadirectives with BLOCK
Probably a fallout of the backport of r14-4471-g6a8edd50a149f1
Fortran/OpenMP: Fix handling of strictly structured blocks
This showed up as parsing error/fail with
libgomp.fortran/metadirective-1.f90
libgomp.fortran/metadirective-6.f90
gcc/fortran/
* decl.cc (gfc_match_end): Handle unnamed END BLOCK with
metadirectives.
---
gcc/fortran/ChangeLog.omp | 5 +++++
gcc/fortran/decl.cc | 3 +++
2 files changed, 8 insertions(+)
@@ -1,3 +1,8 @@
+2023-10-31 Tobias Burnus <tobias@codesourcery.com>
+
+ * decl.cc (gfc_match_end): Handle unnamed END BLOCK with
+ metadirectives.
+
2023-10-30 Tobias Burnus <tobias@codesourcery.com>
* trans-openmp.cc (gfc_trans_omp_clauses): Avoid gfc_evaluate_now
@@ -8409,6 +8409,9 @@ gfc_match_end (gfc_statement *st)
&& state_data->sym->abr_modproc_decl;
}
while (state == COMP_OMP_METADIRECTIVE);
+
+ if (startswith (block_name, "block@"))
+ block_name = NULL;
}
break;
default: