https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77525

            Bug ID: 77525
           Summary: wrong requirement of an upper bound for an array
                    argument
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: francois.jacq at irsn dot fr
  Target Milestone: ---

The following source file does not compile correctly with gfortran 5.3.0 and
5.3.1 
This is a regression because gfortran 4.9.2 is OK

coul@b10p5001:~/test$ gfortran -c mdb_proc.f90
mdb_proc.f90:41:19:

     call my_proc%f(tx,r)

Error: The upper bound in the last dimension must appear in the reference to
the assumed size array 'tx' at (1)

Source file :

module mdb_proc

   ! module managing external procedures to compute specific models

   implicit none
   private   
   save
   public :: listproc,mdb_proc_t

   abstract interface ! all possible signatures of user procedures
      subroutine p(tx,r)
         real,intent(in)  :: tx(*)
         real,intent(out) :: r
      end subroutine
   end interface

   type mdb_proc_t
      character(32)                    :: cname
      integer                          :: mode=0
      procedure(p)     ,pointer,nopass :: f
   end type

   integer,parameter        :: nprocmax=2048
   type(mdb_proc_t),target  :: listproc(0:nprocmax-1)

end module

subroutine test(tx,r)
    use mdb_proc
    implicit none
    real,intent(in) :: tx(*)
    real,intent(out) :: r
    type(mdb_proc_t),pointer :: my_proc
    my_proc => listproc(5)
    call my_proc%f(tx,r)
end subroutine

Reply via email to