aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2023-11-19 05:31:41 +0000
committerSandra Loosemore <sandra@codesourcery.com>2023-12-19 20:07:13 +0000
commit9b8fdcbf2105c65de231ea3db10aaf38e3f68530 (patch)
treea7fb852317f2ccab48ca2c2222153328788f1f15 /gcc/c
parent82b32adaa7f9cf3be71a9d41d80570b9efb4c2f0 (diff)
downloadgcc-9b8fdcbf2105c65de231ea3db10aaf38e3f68530.zip
gcc-9b8fdcbf2105c65de231ea3db10aaf38e3f68530.tar.gz
gcc-9b8fdcbf2105c65de231ea3db10aaf38e3f68530.tar.bz2
OpenMP: Unify representation of name-list properties.
Previously, name-list properties specified as identifiers were stored in the TREE_PURPOSE/OMP_TP_NAME slot, while those specified as strings were stored in the TREE_VALUE/OMP_TP_VALUE slot. This patch puts both representations in OMP_TP_VALUE with a magic cookie in OMP_TP_NAME. gcc/ChangeLog * omp-general.h (OMP_TP_NAMELIST_NODE): New. * omp-general.cc (omp_context_name_list_prop): Move earlier in the file, and adjust for new representation. (omp_check_context_selector): Adjust this too. (omp_context_selector_props_compare): Likewise. gcc/c/ChangeLog * c-parser.cc (c_parser_omp_context_selector): Adjust for new namelist property representation. gcc/cp/ChangeLog * parser.cc (cp_parser_omp_context_selector): Adjust for new namelist property representation. * pt.cc (tsubst_attribute): Likewise. gcc/fortran/ChangeLog * trans-openmp.cc (gfc_trans_omp_declare_varaint): Adjust for new namelist property representation.
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/c-parser.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc
index a61381e..b5bed5e 100644
--- a/gcc/c/c-parser.cc
+++ b/gcc/c/c-parser.cc
@@ -24571,11 +24571,12 @@ c_parser_omp_context_selector (c_parser *parser, tree set, tree parms)
case CTX_PROPERTY_NAME_LIST:
do
{
- tree prop = NULL_TREE, value = NULL_TREE;
+ tree prop = OMP_TP_NAMELIST_NODE;
+ tree value = NULL_TREE;
if (c_parser_next_token_is (parser, CPP_KEYWORD)
|| c_parser_next_token_is (parser, CPP_NAME))
{
- prop = c_parser_peek_token (parser)->value;
+ value = c_parser_peek_token (parser)->value;
c_parser_consume_token (parser);
}
else if (c_parser_next_token_is (parser, CPP_STRING))