aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-07-26 09:13:47 +0200
committerJakub Jelinek <jakub@redhat.com>2021-07-26 09:13:47 +0200
commitacf9d1fd806fabf62dfe232439b11263c191e32d (patch)
tree8cab35a73a0994b4d209681a111d766eb1283f10 /gcc/fortran/trans-expr.c
parent124bb55777c280a85d0c72ec13e293a32917a6b9 (diff)
downloadgcc-acf9d1fd806fabf62dfe232439b11263c191e32d.zip
gcc-acf9d1fd806fabf62dfe232439b11263c191e32d.tar.gz
gcc-acf9d1fd806fabf62dfe232439b11263c191e32d.tar.bz2
openmp: Add support for omp attributes section and scan directives
This patch adds support for expressing the section and scan directives using the attribute syntax and additionally fixes some bugs in the attribute syntax directive handling. For now it requires that the scan and section directives appear as the only attribute, not combined with other OpenMP or non-OpenMP attributes on the same statement. 2021-07-26 Jakub Jelinek <jakub@redhat.com> * parser.h (struct cp_lexer): Add orphan_p member. * parser.c (cp_parser_statement): Don't change in_omp_attribute_pragma upon restart from CPP_PRAGMA handling. Fix up condition when a lexer should be destroyed and adjust saved_tokens if it records tokens from the to be destroyed lexer. (cp_parser_omp_section_scan): New function. (cp_parser_omp_scan_loop_body): Use it. If parser->lexer->in_omp_attribute_pragma, allow optional comma after scan. (cp_parser_omp_sections_scope): Use cp_parser_omp_section_scan. * g++.dg/gomp/attrs-1.C: Use attribute syntax even for section and scan directives. * g++.dg/gomp/attrs-2.C: Likewise. * g++.dg/gomp/attrs-6.C: New test. * g++.dg/gomp/attrs-7.C: New test. * g++.dg/gomp/attrs-8.C: New test.
Diffstat (limited to 'gcc/fortran/trans-expr.c')
0 files changed, 0 insertions, 0 deletions