]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran/OpenMP: Fix handling of strictly structured blocks
authorTobias Burnus <tobias@codesourcery.com>
Sun, 8 Oct 2023 09:54:07 +0000 (11:54 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Sun, 8 Oct 2023 09:54:07 +0000 (11:54 +0200)
commit6a8edd50a149f10621b59798c887c24c81c8b9ea
tree751b651dafaeba4758905671a5536351ffac1fce
parent3da32cc3d1e48f2eac1630e627d34723b9536166
Fortran/OpenMP: Fix handling of strictly structured blocks

For strictly structured blocks, a BLOCK was created but the code
was placed after the block the outer structured block. Additionally,
labelled blocks were mishandled. As the code is now properly in a
BLOCK, it solves additional issues.

gcc/fortran/ChangeLog:

* parse.cc (parse_omp_structured_block): Make the user code end
up inside of BLOCK construct for strictly structured blocks;
fix fallout for 'section' and 'teams'.
* openmp.cc (resolve_omp_target): Fix changed BLOCK handling
for teams in target checking.

libgomp/ChangeLog:

* testsuite/libgomp.fortran/strictly-structured-block-1.f90: New test.

gcc/testsuite/ChangeLog:

* gfortran.dg/block_17.f90: New test.
* gfortran.dg/gomp/strictly-structured-block-5.f90: New test.
gcc/fortran/openmp.cc
gcc/fortran/parse.cc
gcc/testsuite/gfortran.dg/block_17.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/strictly-structured-block-5.f90 [new file with mode: 0644]
libgomp/testsuite/libgomp.fortran/strictly-structured-block-1.f90 [new file with mode: 0644]