GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
OpenMP/Fortran

OpenMP/Fortran: Disallow severity clause on target/teams

OpenMP/Fortran: Severity clause is now disallowed on target/teams constructs.

The severity clause for OpenMP target and teams constructs has been disallowed to align with OpenMP specifications (Spec Issue 5010). This change updates the parser and related code to reflect that the severity clause, which previously had inconsistent error termination behavior, is no longer permitted for these constructs, although message clauses remain.

In Details

This commit removes support for the OMP_CLAUSE_SEVERITY in OpenMP target and teams constructs within the Fortran frontend. The severity clause was introduced in OpenMP TR15 but later removed before OpenMP 6.1 due to inconsistencies in error handling. This change ensures the parser and tree representation (tree-core.h, tree-pretty-print.cc) correctly reject this clause for target/teams, while still allowing the associated message clause.

For Context
OpenMP
A standardized API for shared-memory parallel programming, providing directives that can be added to C, C++, and Fortran code to specify parallel regions and tasks.
severity clause
An OpenMP clause that specifies the action to take when an error occurs, such as printing a message or terminating execution.
target construct
An OpenMP construct that offloads computation to a device, such as a GPU.
teams construct
An OpenMP construct that creates a set of teams of threads, allowing for nested parallelism.
TR15
Technical Report 15, an earlier specification document for OpenMP that may have contained features not present in the final standard.
Filed Under: openmpfortranparserspecification