diff options
author | Sandra Loosemore <sloosemore@baylibre.com> | 2025-01-14 23:27:53 +0000 |
---|---|---|
committer | Sandra Loosemore <sloosemore@baylibre.com> | 2025-01-16 18:12:12 +0000 |
commit | 4e20914d3306d8898ce586313a40fb92ef0b8964 (patch) | |
tree | 1f738d5e735bfb7b2fe46920790b91088b216502 /libgomp/testsuite | |
parent | 0696af74b3392e2178215607337b116d1bb53e34 (diff) | |
download | gcc-4e20914d3306d8898ce586313a40fb92ef0b8964.zip gcc-4e20914d3306d8898ce586313a40fb92ef0b8964.tar.gz gcc-4e20914d3306d8898ce586313a40fb92ef0b8964.tar.bz2 |
OpenMP: Add C support for metadirectives and dynamic selectors.
Additional shared C/C++ testcases are included in a subsequent patch in this
series.
gcc/c-family/ChangeLog
PR middle-end/112779
PR middle-end/113904
* c-common.h (enum c_omp_directive_kind): Add C_OMP_DIR_META.
(c_omp_expand_variant_construct): Declare.
* c-gimplify.cc: Include omp-general.h.
(genericize_omp_metadirective_stmt): New.
(c_genericize_control_stmt): Add case for OMP_METADIRECTIVE.
* c-omp.cc (c_omp_directives): Fix entries for metadirective.
(c_omp_expand_variant_construct_r): New.
(c_omp_expand_variant_construct): New.
* c-pragma.cc (omp_pragmas): Add metadirective.
* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_METADIRECTIVE.
gcc/c/ChangeLog
PR middle-end/112779
PR middle-end/113904
* c-parser.cc (struct c_parser): Add omp_metadirective_state field.
(c_parser_skip_to_end_of_block_or_statement): Add metadirective_p
parameter and handle skipping over the parentheses in a "for"
statement.
(struct omp_metadirective_parse_data): New.
(mangle_metadirective_region_label): New.
(c_parser_label): Mangle label names in a metadirective body.
(c_parser_statement_after_labels): Likewise.
(c_parser_pragma): Handle PRAGMA_OMP_METADIRECTIVE.
(c_parser_omp_context_selector): Allow arbitrary expressions in
device_num and condition properties.
(c_parser_omp_assumption_clauses): Handle C_OMP_DIR_META.
(analyze_metadirective_body): New.
(c_parser_omp_metadirective): New.
gcc/testsuite/
PR middle-end/112779
* c-c++-common/gomp/declare-variant-2.c: Adjust expected output for C.
* gcc.dg/gomp/metadirective-1.c: New.
Co-Authored-By: Kwok Cheung Yeung <kcy@codesourcery.com>
Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>
Diffstat (limited to 'libgomp/testsuite')
0 files changed, 0 insertions, 0 deletions