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

           Summary: Proc-pointer declaration in BLOCK construct
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: bur...@gcc.gnu.org
                CC: ja...@gcc.gnu.org, do...@gcc.gnu.org


Follow up to PR 49397. The following code should be parsed correctly.

Currently, one gets:

test.f90:8.8:

        Procedure(Real),Pointer :: p
        1
Error: Unclassifiable statement at (1)


(Regarding the validity, cf. also PR 49397 and IR J3/11-198.)

  Program m5
    Call s
  Contains
    Subroutine s
      Print *,g()
      block
        Procedure(Real),Pointer :: p
        p => g
        Print *,p()
      end block
    End Subroutine
  End Program
  Function g()
    g = 2
  End Function

Reply via email to