This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran, F03] PR 40996: Allocatable Scalars
On Sun, Aug 30, 2009 at 01:00:21PM +0200, Janus Weil wrote:
>
> > It does regtest OK but it needs
> > possible error conditions checking out; for example
> >
> > ?allocate(non-existent-symbol :: x(2))
> > ? ? ? ? ? ? ? ? ? 1
> > Error: Allocate-object at (1) is not a nonprocedure pointer or an
> > allocatable variable
> >
> > Which is OK from the perspective of it producing an error but might
> > perplex the uninitiated:-)
>
> I extended your patch a bit so that it gives a better error message
> for this example. It also rejects abstract types in the ALLOCATE
> statement. 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.
--
Steve