[J3] Question on Table 10.8: Intrinsic assignment type conformance

Vipul Parekh parekhvs at gmail.com
Thu Jun 13 21:14:52 EDT 2019


On Thu, Jun 13, 2019 at 6:55 PM Steve Lionel via J3
<j3 at mailman.j3-fortran.org> wrote:
>
> ..
> Note the use of "declared type". The declared type of b and f() are both
> b_t, so this conforms.
>

Thanks, Steve, for your input.  I'd noticed that the use of "declared
type", I was wondering whether there was any additional interpretation
anywhere else in the standard that came into play with this
assignment.  There isn't any such considerations, it appears.

> As for the warning from the Cray compiler, it is correct. An ALLOCATE of
> a variable without SOURCE= does not define the variable. See 19.6.5.
> ..

That's good to know.  Again I was wondering if there was an item in
section 19.6.5 toward derived types with zero components that I had
failed to notice.  Upon reading "Allocation of a zero-sized array or
zero-length character variable causes the array or variable to become
defined." and with *sequence types*, "When all components of a
structure of a numeric sequence type or character sequence type become
defined as a result of partially associated objects becoming defined,
the structure becomes defined," I became expectant of a consideration
somewhere in the standard regarding a variable of a derived type with
no components getting defined upon allocation.  That would only be
common sense in my view.  But it must not be that simple and
straightforward with derived types.

Regards,
Vipul


More information about the J3 mailing list