[flang] Don't fold STORAGE_SIZE() on polymorphic argument
authorPeter Klausler <pklausler@nvidia.com>
Fri, 20 Jan 2023 00:42:59 +0000 (16:42 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Fri, 27 Jan 2023 19:58:41 +0000 (11:58 -0800)
commit057a2c239e801810fc28d3e87fc4e9cf50be0fc5
treea997343b9c0c9ca97e31b6f60596054b67bb8b70
parent5274a460dac6ab8620519859a2d59eea37123550
[flang] Don't fold STORAGE_SIZE() on polymorphic argument

More generally, don't return a successful result from
Fortran::evaluate::DynamicType::MeasureSizeInBytes() when the
type is polymorphic.

Differential Revision: https://reviews.llvm.org/D142772
flang/lib/Evaluate/type.cpp
flang/test/Evaluate/errors01.f90