[flang-commits] [flang] [flang][OpenMP] Fix the attribute setting for OmpCommonBlock (PR #73676)

via flang-commits flang-commits at lists.llvm.org
Fri Dec 1 09:24:59 PST 2023


shraiysh wrote:

Its about the common block itself. If you look at the previous code - it was checking conditions on the `ompFlag` but setting `OmpCommonBlock`. This meant that `OmpCommonBlock` would be set on a variable only if it was present in certain clauses, and all the mutually exclusive clauses would still pass, because `CheckMultipleOccurences` is called with the `OmpCommonBlock` symbol. This patch sets `ompFlag` to the common block when it appears in a clause where such flag is supposed to be set, and it sets the `OmpCommonBlock` everytime a common block name is resolved in OpenMP constructs, which should be the expected behavior.

https://github.com/llvm/llvm-project/pull/73676


More information about the flang-commits mailing list