[patch] Fix fortran/25031, multiple allocations

Paul Thomas paulthomas2@wanadoo.fr
Thu Mar 2 19:53:00 GMT 2006


Thomas,

>:ADDPATCH fortran:
>
>Hello world,
>
>here is a fix for PR 25031.  The problem here was that we used
>to be capable of allocating an allocatable array twice without
>intermediate deallocation, which should raise an error.
>
>OK for mainline and for 4.1 after unfreeze?
>  
>
:REVIEWMAIL:

OK.

Before you commit, you might like to take a look at my version, which is 
attached.  The TREE work does produce more cumbersome looking 
code(attached is the code for your testcase) than yours (or at least 
many more braces), it could do with special treatment for constant sizes 
and needs a proper code for stat.  However, it is an amusing 
self-education exercise and you might care to incorporate the interface 
to gfc_allocate array.

Thanks

Paul
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: allocate.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060302/a3a91a9c/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: multiple_allocation_1.f90.t02.original
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060302/a3a91a9c/attachment-0001.ksh>


More information about the Fortran mailing list