Find a file
Pete Steinfeld 7139a04e31 [flang] Add a check for DO step expressions being zero
This is prohibited by Section 11.1.7.4.1, paragraph 1.

Note also that we allow for REAL step expressions.  But the check I
added only works for INTEGER step expressions.

I added a function to tools.cc to test to see if an expression is zero,
and I added calls to check-do.cc for regular and CONCURRENT DO
statements to this function.  I made the regular DO a warning and the DO
CONCURRENT message an error.  I added tests for the DO CONCURRENT case,
including a test that uses an integer constant.

Original-commit: flang-compiler/f18@8c4fadfe00
Reviewed-on: https://github.com/flang-compiler/f18/pull/834
2019-12-02 13:26:31 -08:00
flang [flang] Add a check for DO step expressions being zero 2019-12-02 13:26:31 -08:00