[flang-commits] [flang] [flang][OpenMP] Remember decision of allowing past/future clause (PR #227419)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Thu Oct 1 06:03:08 PDT 2026
kparzysz wrote:
> Also noticed the following that [...]
The code that checked the validity of clauses would first check if the clause is allowed. The check would include checking the existing overrides, so that if there has already been a warning emitted for this case, it wouldn't be repeated. With -Werror the intent was to show the error diagnostic for every occurrence. To accomplish that the overrides were only set if -Werror was not present.
The problem happened when the diagnostic was suppressed and -Werror was present. The suppression should make the diagnostic be treated as a warning, i.e. the clause should be accepted on the directive and the override should be set. Instead, the diagnostic was not shown (as expected), but the override was not set. The compilation proceeded to lowering, but since the override wasn't set, the decomposition code failed.
To fix this the code checking clause validity will not consult the overrides anymore (i.e. it will show warnings for each occurrence of the issue), and will set the override unconditionally.
https://github.com/llvm/llvm-project/pull/227419
More information about the flang-commits
mailing list