diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-08-19 10:38:19 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-08-19 10:42:57 +0200 |
commit | c04d766942274da89b236c4cb7e954b26da397c7 (patch) | |
tree | abd34947fbbcc9dcab8d534ca41f856f3af47d45 /gcc/tree-vect-generic.c | |
parent | cb23be4fa59be26a7ba08918d6973e1d94629f8a (diff) | |
download | gcc-c04d766942274da89b236c4cb7e954b26da397c7.zip gcc-c04d766942274da89b236c4cb7e954b26da397c7.tar.gz gcc-c04d766942274da89b236c4cb7e954b26da397c7.tar.bz2 |
openmp: Fix ICE on requires clause with atomic_default_mem_order (
When working on error directive, I've noticed the C FE ICEs on
#pragma omp requires atomic_default_mem_order (
where it tries to peek 2nd token after the CPP_PRAGMA_EOL (or CPP_EOF)
in there in order to improve error-recovery on say
atomic_default_mem_order (acquire)
or
atomic_default_mem_order (seqcst)
etc. The C++ FE didn't ICE, but it is better to follow the same thing there.
2021-08-19 Jakub Jelinek <jakub@redhat.com>
gcc/c/
* c-parser.c (c_parser_omp_requires): Don't call
c_parser_peek_2nd_token and optionally consume token if current
token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
gcc/cp/
* parser.c (cp_parser_omp_requires): Don't call cp_lexer_nth_token_is
and optionally consume token if current token is CPP_EOF,
CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
gcc/testsuite/
* c-c++-common/gomp/requires-3.c: Add testcase for
atomic_default_mem_order ( at the end of line without corresponding ).
Diffstat (limited to 'gcc/tree-vect-generic.c')
0 files changed, 0 insertions, 0 deletions