diff options
author | Jakub Jelinek <jakub@redhat.com> | 2022-09-06 09:24:13 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2022-09-06 09:28:06 +0200 |
commit | 0bd514107de7b0f643aa72554b3bdb5aeb5aa0f5 (patch) | |
tree | 48b3325fdb7e433a3ee06c4e74e6be99310a858d /gcc/c | |
parent | 1bf8b7adc2de6f2ddaffa3af131b6855ae3e3793 (diff) | |
download | gcc-0bd514107de7b0f643aa72554b3bdb5aeb5aa0f5.zip gcc-0bd514107de7b0f643aa72554b3bdb5aeb5aa0f5.tar.gz gcc-0bd514107de7b0f643aa72554b3bdb5aeb5aa0f5.tar.bz2 |
openmp: Be consistent on parsing offsets between normal sink vector and omp_cur_iteration - 1
For normal sink vectors, we just check that the token is CPP_NUMBER and with
INTEGER_CST value, while for omp_cur_iteration I was additionally requiring
integer_type_node type (so only 1, 001, 0x0001 but not 1L or 1ULL etc.).
I think we need to clarify what we actually should allow in the standard, until
then it is better to be consistent.
2022-09-06 Jakub Jelinek <jakub@redhat.com>
gcc/c/
* c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
in omp_cur_iteration - 1 has integer_type_node type.
gcc/cp/
* parser.cc (cp_parser_omp_clause_doacross_sink): Don't verify val
in omp_cur_iteration - 1 has integer_type_node type.
gcc/testsuite/
* c-c++-common/gomp/doacross-6.c (corge): Don't expect an error here.
Add a few further tests.
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/c-parser.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc index 65d73a6..72db5b5 100644 --- a/gcc/c/c-parser.cc +++ b/gcc/c/c-parser.cc @@ -15993,8 +15993,7 @@ c_parser_omp_clause_doacross_sink (c_parser *parser, location_t clause_loc, && c_parser_peek_nth_token (parser, 4)->type == CPP_CLOSE_PAREN) { tree val = c_parser_peek_nth_token (parser, 3)->value; - if (integer_onep (val) - && comptypes (TREE_TYPE (val), integer_type_node)) + if (integer_onep (val)) { c_parser_consume_token (parser); c_parser_consume_token (parser); |