flang-compiler / f18

F18 is a front-end for Fortran intended to replace the existing front-end in the Flang compiler
230 stars 48 forks source link

Add more checks on WHERE and FORALL #1009

Closed tskeith closed 4 years ago

tskeith commented 4 years ago

Check that masks and LHS of assignments in WHERE statements and constructs have consistent shapes. They must all have the same rank and any extents that are compile-time constants must match.

Emit a warning for assignments in FORALL statements and constructs where the LHS does not reference each of the index variables.

This makes AssignmentChecker need some Enter/Leave functions that conflict with those in DoForallChecker so create StatementSemanticsPass3 and move AssignmentChecker there. Future checkers now have the option of being in that pass.