OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [dummy_procedure_3.f90] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do run }
! { dg-do run }
! PR37926 - the interface did not transfer the formal
! PR37926 - the interface did not transfer the formal
! argument list for the call to 'asz' in the specification of 'p'.
! argument list for the call to 'asz' in the specification of 'p'.
!
!
! Contributed by Janus Weil  
! Contributed by Janus Weil  
!
!
module m
module m
contains
contains
  pure integer function mysize(a)
  pure integer function mysize(a)
    integer,intent(in) :: a(:)
    integer,intent(in) :: a(:)
    mysize = size(a)
    mysize = size(a)
  end function
  end function
end module
end module
program prog
program prog
  use m
  use m
  implicit none
  implicit none
  character(3) :: str
  character(3) :: str
  integer :: i(3) = (/1,2,3/)
  integer :: i(3) = (/1,2,3/)
  str = p(i,mysize)
  str = p(i,mysize)
  if (len(str) .ne. 3) call abort
  if (len(str) .ne. 3) call abort
  if (str .ne. "BCD") call abort
  if (str .ne. "BCD") call abort
contains
contains
  function p(y,asz)
  function p(y,asz)
    implicit none
    implicit none
    integer :: y(:)
    integer :: y(:)
    interface
    interface
      pure integer function asz(c)
      pure integer function asz(c)
        integer,intent(in) :: c(:)
        integer,intent(in) :: c(:)
      end function
      end function
    end interface
    end interface
    character(asz(y)) p
    character(asz(y)) p
    integer i
    integer i
    do i=1,asz(y)
    do i=1,asz(y)
      p(i:i) = achar(iachar('A')+y(i))
      p(i:i) = achar(iachar('A')+y(i))
    end do
    end do
  end function
  end function
end
end
! { dg-final { cleanup-modules "m" } }
! { dg-final { cleanup-modules "m" } }
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.