[flang-commits] [flang] [flang] To issue error message for unsupported usage of vector type. (PR #215248)
Daniel Chen via flang-commits
flang-commits at lists.llvm.org
Thu Aug 13 21:27:46 PDT 2026
================
@@ -2767,7 +2767,8 @@ bool IsLenTypeParameter(const Symbol &symbol) {
}
bool IsExtensibleType(const DerivedTypeSpec *derived) {
- return !IsSequenceOrBindCType(derived) && !IsIsoCType(derived);
+ return !IsSequenceOrBindCType(derived) && !IsIsoCType(derived) &&
----------------
DanielCChen wrote:
> module m
> interface read(formatted)
> module procedure rf
> end interface
> contains
> subroutine rf(dtv, unit, iotype, vlist, iostat, iomsg)
> vector(integer(4)), intent(inout) :: dtv
> integer, intent(in) :: unit
> character(*), intent(in) :: iotype
> integer, intent(in) :: vlist(:)
> integer, intent(out) :: iostat
> character(*), intent(inout) :: iomsg
> end subroutine
> end module
This PR doesn't flag an error for this case because the `dtv` object is allowed to be non-polly and this PR only checks cases where a vector type object requires a runtime descriptor. However, it is indeed a invalid usage as a vector type is not a "real" derived type. I will add the check and testing.
https://github.com/llvm/llvm-project/pull/215248
More information about the flang-commits
mailing list