[Patch, Fortran] PR32936 - Allocate's STAT & function result

Tobias Burnus burnus@net-b.de
Mon Jul 30 18:27:00 GMT 2007


:ADDPATCH fortran:

The ALLOCATE's STAT actual argument must be a variable; however, the
check did not properly do so and thus function names which are return
variables were rejected.

I fixed this and enhanced the check a bit.

Additionally, I was a bit surprised that  "allocated(pointer)" gave the
error that "pointer" needs to be an array; it took me a while that I
realized that it needs to have an allocatable and not a pointer [I
should have used associated()]. I therefore suggest to change the order
of the checks.

Build and regression tested with no failure.
Ok for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check.diff
Type: text/x-patch
Size: 745 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070730/746b060e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stat-patch.diff
Type: text/x-patch
Size: 3979 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070730/746b060e/attachment-0001.bin>


More information about the Fortran mailing list