program fc011

! Submitted by Walt Brainerd, The Fortran Company
! GNU Fortran 95 (GCC 4.1.0 20050322 (experimental))
! Windows XP

  ! This program violates the following rule, identified below.

  integer, pointer :: PTR

  ! stat-variable must not be allocated within the ALLOCATE statement in
  ! which it appears -- this in general cannot be checked at compile-time
  ! but in this case it can be.

  allocate (PTR, stat=PTR)

  print *, 'This program has one error', PTR

end program fc011

-- 
           Summary: ALLOCATEing the STAT variable not detected
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: enhancement
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tobi at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to