The following testcase produces an error:

--------------------------------------------------------
function all_res()

implicit none

real, pointer :: gain 
integer :: all_res

allocate (gain,STAT=all_res)

end
--------------------------------------------------------


--------------------------------------------------------
gfortran -c test_gfortran3.f90 
test_gfortran3.f90:8.27:

allocate (gain,STAT=all_res)
                          1
Error: STAT expression at (1) must be a variable
--------------------------------------------------------

Tried with gfortran 4.2.1 and r127057. NAG and Lahey compiler work with this
code. Platform i686, Debian lenny.


-- 
           Summary: Error: STAT expression ... must be a variable - but it
                    is
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: flad at gmx dot at


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32936

Reply via email to