Skip to content
Commit e59305d7 authored by Jinxin (Brian) Yang's avatar Jinxin (Brian) Yang Committed by GitHub
Browse files

[flang] [OpenMP] parse tree changes for Sections/Parallel Sections constructs...

[flang] [OpenMP] parse tree changes for Sections/Parallel Sections constructs (flang-compiler/f18#652)

```
!$omp sections [clause[ [,] clause] ... ]
[!$omp section]
structured-block
[!$omp section
structured-block]
...
!$omp end sections [nowait]
```

1. Following parse tree node changes for Block constructs, changing the
   Sections/Parallel Sections to `{Begin, Section-Blocks, End}`

2. Handles `!$omp section` in the parser, do not create parse tree node
   for this directive because basically it is a delimiter to split the
   code into different `Block`s within the Sections/Parallel Sections
   constructs. So, the `Section-Blocks` here is a `std::list` of `Block`s.
   (thanks to Tim's suggestion)

3. Modify check-omp-structure.* to avoid breaking existing tests

More tests will be added during Semantics. Also, similar to Block constructs,
the `Begin` and `End` directive matching will be done in future PR.

This commit also contains Peter's important fix for allowing "!$OMP END SECTION"
as a legal statement following `Block` (daf5630: Modify execution part error
recovery to not consume !$OMP SECTION).


Original-commit: flang-compiler/f18@75d016f6d27e73f5d559fe68d8a01df251c6d8cb
Reviewed-on: https://github.com/flang-compiler/f18/pull/652
parent e688b272
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment