[flang] Fix bug detecting simply contiguous component
authorTim Keith <tkeith@nvidia.com>
Sun, 26 Jan 2020 18:42:34 +0000 (10:42 -0800)
committerTim Keith <tkeith@nvidia.com>
Mon, 27 Jan 2020 19:51:32 +0000 (11:51 -0800)
commit56634417e7b2897f581bf30bcd30755683cc9e82
treebe111886a78599febdfa5b3bf567e047f6717815
parent2dfeffa696e3e23f451268b16d7afc7219eafd70
[flang] Fix bug detecting simply contiguous component

We were always return false when testing a component for simple
contiguity. Change to check that the component is an array that is
simply continguous. Also treat a scalar component of scalar as simply
contiguous.

A pointer with bounds remapping to a complex part is a similar case
so add a test for that too.

Original-commit: flang-compiler/f18@27d76da2a44614b2c4cf4d576410372cabf66577
Reviewed-on: https://github.com/flang-compiler/f18/pull/952
flang/lib/evaluate/check-expression.cc
flang/test/semantics/assign03.f90