What is still missing is a check if the type in the
ALLOCATE stmt is compatible with the type of the allocate-object (i.e.
C624, see my test case).
Which type? For the intrinsic types, the checking of compatibility
was in my original type.
Yeah, sure. This is about derived types, where you have two
possibilities AFAICS:
1) If the object which is being allocated was declared with TYPE, the
ALLOCATE statement must have the same type (or omit it).
2) If the object which was declared with CLASS, the ALLOCATE statement
may have any type which is a descendant of the original type.
Btw: Do we have a function which checks if one type is an extension
(direct or indirect) of another, or do I have to invent this?