[PATCH] D77821: [Flang][OpenMP] Avoid abort when collapse clause value is negative

Steve Scalpone via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 08:37:41 PDT 2020


sscalpone added a comment.

Yes, @clementval, I understood your comment, and it got me thinking about the structure of the compiler's evaluation of OpenMP semantics.  Looking at the code, I believe the assert at line 6517 will trigger if the collapse value is greater than the loop nest. Unfortunately the check for collapse(n) cannot be moved earlier to the structure checker because symbols have not yet been resolved so 'n' cannot be evaluated.  I've talked with @ichoyjx about keeping the symbol resolution here but moving the association of attributes to semantics, at which time all of the required information can be available.

In the meantime, this change is a reasonable workaround to prevent the assertion until the code is restructured.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77821/new/

https://reviews.llvm.org/D77821





More information about the llvm-commits mailing list