Name resolution was probably failing in bug reported at
as the omp critical construct needs a new symbol for the name which was
missing. This is fixed by creating a new symbol during name resolution
for a new flag OmpCriticalLock.
Upgrade to OMP-5.0 standard.
Checks for restrictions from OMP-5.0 are added.
- If a name is specified on a critical directive, the same name must also be specified on the
end critical directive.
- If no name appears on the critical directive, no name can appear on the end critical
- Unless the effect is as if hint(omp_sync_hint_none) was specified, the critical
construct must specify a name.
A new routine CheckNameMatching mostly follows CheckEndName from resolve-labels.cpp.