You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a sequence type stored in an unlimited polymorphic variable, the compiler doesn't approve of even a single method to access the data:
! seq_type.f90
type :: seq_type
sequence
real:: val
end type
class(*), allocatable :: a
a = seq_type(val=3.0)
select type(a)
type is (seq_type)
print*, a%val
end select
block
type(seq_type) :: b
call move_alloc(from=a,to=b)
print*, b%val
end block
block
type(seq_type) :: b
b =transfer(a, b)
print*, b%val
end block
end
~> nagfor sequence_upv.f90
NAG Fortran Compiler Release 7.2(Shin-Urayasu) Build 7203
Error: sequence_upv.f90, line 14: TYPE IS specifies SEQUENCE type SEQ_TYPE
Error: sequence_upv.f90, line 20: Expected an ALLOCATABLE variable for argument TO (no. 2) of intrinsic MOVE_ALLOC
Warning: sequence_upv.f90, line 26: Intrinsic TRANSFER from polymorphic data object might have partially undefined result
[NAG Fortran Compiler error termination, 2 errors, 1 warning]
Given a sequence type stored in an unlimited polymorphic variable, the compiler doesn't approve of even a single method to access the data:
This is a corner case of the discussions in,
The text was updated successfully, but these errors were encountered: