[flang] Relax the check for polymorphic pointer in storage_size intrinsic
authorValentin Clement <clementval@gmail.com>
Thu, 23 Feb 2023 16:28:54 +0000 (17:28 +0100)
committerValentin Clement <clementval@gmail.com>
Thu, 23 Feb 2023 16:30:21 +0000 (17:30 +0100)
commite77fc0dd76ab2aade6fed2358dbc603c0c80d20c
tree518a9c87b6d365e9500391ab8369e565448afa78
parentb7691d7be0362499eaadbec13cec5f2e248836f6
[flang] Relax the check for polymorphic pointer in storage_size intrinsic

The runtime check was a too strong as the standard says.
> If it is polymorphic it shall not be an undefined pointer.
The check was checking if the pointer was associated.
Remove the check as other compilers do.

Depends on D144643

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D144644
flang/lib/Optimizer/Builder/IntrinsicCall.cpp
flang/test/Lower/Intrinsics/storage_size.f90