This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH/gfortran] Partial fix for PR 21375


The attached patch fixes the use of STAT= in 
a deallocate statement for allocatable arrays.
This is a partial fix for PR 21375i because I
have no idea how to deal with POINTER variables.
That is, the following now works with the patch

    program a
    integer i
    integer, allocatable :: j(:)
    deallocate(j,stat=i)
    if (i /= 1) call abort
    end program a

but the PR was concerned with a program of the form

    program a
    integer i
    integer, pointer :: j
    deallocate(j,stat=i)
    if (i /= 1) call abort
    end program a

I've spent several hours today trying to understand the
POINTER case, but have come up empty.  All help is
gratefully accepted.

-- 
Steve

Attachment: pr21375.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]