From 9b8fdcbf2105c65de231ea3db10aaf38e3f68530 Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Sun, 19 Nov 2023 05:31:41 +0000 Subject: 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. --- gcc/c/c-parser.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/c') 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)) -- cgit v1.1