[flang] Catch obscure structure constructor error
authorPeter Klausler <pklausler@nvidia.com>
Tue, 7 Feb 2023 23:09:03 +0000 (15:09 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Mon, 13 Feb 2023 23:24:35 +0000 (15:24 -0800)
commitb57bc158ea462c897211aa64c3b4071fdac2f12c
tree5402caa3cf369907f515261b247614b7182f6b49
parentee88f11770032eac8998664e7102d37f54b9f027
[flang] Catch obscure structure constructor error

A scalar value in a structure constructor may correspond to an
array component in the derived type only when that component has
a shape to which the scalar value may be expanded.

Differential Revision: https://reviews.llvm.org/D143822
flang/lib/Semantics/expression.cpp
flang/test/Semantics/data01.f90
flang/test/Semantics/structconst06.f90 [new file with mode: 0644]