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: