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/54147] New: [F03] Interface checks for PPCs & TBPs


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

             Bug #: 54147
           Summary: [F03] Interface checks for PPCs & TBPs
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: janus@gcc.gnu.org


After fixing PR 42418, I realized that the constraints in F08:C1216 apply also
to
1) procedure-pointer components and
2) type-bound procedures,
where they are currently not enforced.


Test case for PPCs:


  interface gen
    procedure gen
  end interface

  type t1
    procedure(gen),pointer,nopass  :: p1
    procedure(gen2),pointer,nopass :: p2  ! { dg-error "may not be generic" }
  end type

  type t2
    procedure(sf),pointer,nopass   :: p3  ! { dg-error "may not be a statement
function" }
  end type

  type t3
    procedure(char),pointer,nopass :: p4  ! { dg-error "Intrinsic procedure" }
  end type

  interface gen2
    procedure gen
  end interface

  sf(x) = x**2

contains

  subroutine gen
  end subroutine

end


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