[flang] Fix another bug checking simple contiguity
authorTim Keith <tkeith@nvidia.com>
Tue, 28 Jan 2020 23:06:03 +0000 (15:06 -0800)
committerTim Keith <tkeith@nvidia.com>
Thu, 30 Jan 2020 00:08:39 +0000 (16:08 -0800)
commitf1b61dbd5ebf9bb563a879c970ef2969461129df
tree381f13d9f87dc386e8d12b5da281cf1a6814ced6
parent6d92012d23df7949ff6d80a920c9048c9dac874f
[flang] Fix another bug checking simple contiguity

The test still wasn't correct for structure components. If the last
part-ref is a non-array or a single array element, but the whole
ArrayRef has non-zero rank, it is not contiguous. Otherwise, if there
are subscripts on the last part-ref they can be checked normally.

Add some tests for cases that were previously failing, and also for
cases with vector subscripts.

Original-commit: flang-compiler/f18@aa0a0887325bd1fc6c3a1ad40fc6711d2e458a1c
Reviewed-on: https://github.com/flang-compiler/f18/pull/961
flang/lib/evaluate/check-expression.cpp
flang/test/semantics/assign03.f90