This is the mail archive of the gcc-bugs@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]

[Bug fortran/50438] New: proc pointer to subroutine in structure constructors


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

             Bug #: 50438
           Summary: proc pointer to subroutine in structure constructors
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dfranke@gcc.gnu.org
                CC: janus@gcc.gnu.org


[http://gcc.gnu.org/ml/fortran/2011-09/msg00080.html]

The example below should be valid but is currently rejected:

$ cat procpointer.f90
  IMPLICIT NONE
  TYPE :: a
    PROCEDURE(proc), POINTER, NOPASS :: p
  END TYPE
  ABSTRACT INTERFACE
    SUBROUTINE proc
    END SUBROUTINE
  END INTERFACE
  TYPE(a), PARAMETER :: aa = a(aproc)     ! <--- 
CONTAINS
  SUBROUTINE aproc
  END SUBROUTINE
END

$ gfortran-svn -Wall -W -fimplicit-none procpointer.f90

  TYPE(a), PARAMETER :: aa = a(aproc)     ! <--- 
                                    1
Error: Symbol 'aproc' at (1) has no IMPLICIT type

$ gfortran-svn -v
gcc version 4.7.0 20110915 (experimental) (GCC)


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