-> Loop index variables are separately privatised in Flang. If these
variables occur as part of a privatisation clause then do not double
privatise them.
-> Allow the privatisation of an already privatised variable. This
requires that we always push SymbolStack in an OpenMPConstruct.
-> If we do a shallow lookup and not find a symbol then it is OK to
add a new binding at the topmost level. For this purpose use
bindIfNewSymbol instead of bindSymbol.
-> Loop index variables are separately privatised in Flang. If these variables occur as part of a privatisation clause then do not double privatise them.
-> Allow the privatisation of an already privatised variable. This requires that we always push SymbolStack in an OpenMPConstruct.
-> If we do a shallow lookup and not find a symbol then it is OK to add a new binding at the topmost level. For this purpose use
bindIfNewSymbol
instead ofbindSymbol
.-> Adds a testcase and corrects a few testcases.
This fixes a few issues seen in SNAP and Spec OMP 2012 (https://github.com/llvm/llvm-project/issues/54473).