[J3] Co-array question
Mark LeAir
mleair at nvidia.com
Wed Aug 18 17:01:07 UTC 2021
Hi,
One of our engineers had the following questions about the co-arrays. Can someone from the list answer them?
Does the following program constitute a violation of F'2018 C949 ("The declared type of source-expr shall not have a coarray ultimate component.")?
program main
type :: type
integer, allocatable :: coarray[:]
end type
type(type), save, target :: object
class(*), allocatable :: allocatable
allocate(object%coarray[*]);
allocate(allocatable, source = object)
end
And is the following in violation of any constraint, or is it now a conforming program?
program main
type :: type
integer, allocatable :: coarray[:]
end type
type(type), save, target :: object
class(*), pointer :: pointer
class(*), allocatable :: allocatable
allocate(object%coarray[*]);
pointer => object
allocate(allocatable, source = pointer)
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210818/f99eb89b/attachment.htm>
More information about the J3
mailing list