]> git.feebdaed.xyz Git - 0xmirror/gcc.git/commit
OpenMP: Add no_openmp_constructs; improve Fortran clause parsing
authorTobias Burnus <tburnus@baylibre.com>
Thu, 18 Dec 2025 21:55:40 +0000 (22:55 +0100)
committerTobias Burnus <tburnus@baylibre.com>
Thu, 18 Dec 2025 21:55:40 +0000 (22:55 +0100)
commit4d6a43726148dbb2eff916de375af6003eacf8c9
tree4b3bc25b601575fa2a90f0ca250f095ca4eeb3f5
parentf5cda36f16d447198c1e00b191d720b6f4a02876
OpenMP: Add no_openmp_constructs; improve Fortran clause parsing

Add the assumption clause 'no_openmp_constructs' (which as most assumption
clauses is ignored in the front end - for now).
For Fortran, improve free-form parsing of argument-free clauses
by avoiding substring matches.

gcc/c/ChangeLog:

* c-parser.cc (c_parser_omp_assumption_clauses): Add
no_openmp_constructs clause.

gcc/cp/ChangeLog:

* parser.cc (cp_parser_omp_assumption_clauses): Add
no_openmp_constructs clause.

gcc/fortran/ChangeLog:

* dump-parse-tree.cc (show_omp_assumes): Handle
no_openmp_constructs clause.
* gfortran.h (struct gfc_omp_assumptions): Add
no_openmp_constructs.
* openmp.cc (gfc_match_dupl_check): For free-form
Fortran, avoid substring matching.
(gfc_match_omp_clauses): Match no_openmp_constructs clause.
Remove no longer needed 'needs_space', match 'order' followed by
parenthesis instead of 'order' with parenthesis; reorder 'order'
and 'ordering' clauses for free-form Fortran.
(gfc_match_omp_assumes): Handle no_openmp_constructs clause.

libgomp/ChangeLog:

* libgomp.texi (OpenMP Implemenation Status): Mark
no_openmp_constructs as implemented.

gcc/testsuite/ChangeLog:

* gfortran.dg/goacc/update-if_present-2.f90: Update dg-error.
* gfortran.dg/gomp/order-8.f90: Likewise.
* gfortran.dg/gomp/order-9.f90: Likewise.
* c-c++-common/gomp/assume-5.c: New test.
* gfortran.dg/gomp/assume-6.f90: New test.
gcc/c/c-parser.cc
gcc/cp/parser.cc
gcc/fortran/dump-parse-tree.cc
gcc/fortran/gfortran.h
gcc/fortran/openmp.cc
gcc/testsuite/c-c++-common/gomp/assume-5.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/update-if_present-2.f90
gcc/testsuite/gfortran.dg/gomp/assume-6.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/order-8.f90
gcc/testsuite/gfortran.dg/gomp/order-9.f90
libgomp/libgomp.texi