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

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 14:32:31 PDT 2020


klausler added a comment.

> As far as I can tell, the collapse argument is a `scalarIntConstantExpr` to the parser. So conceptually one could make it a `scalarPositiveIntConstantExpr` and issue an error early.

Fortran has scalar-int-constant-expr but not scalar-positive-int-constant-expr as nonterminals.

The f18 parser doesn't do any semantic checking in any case.  The various constrained nonterminals of Fortran are represented in the parse tree and checked later in expression semantics.


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