OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [gfortran.dg/] [array_function_4.f90] - Rev 516

Compare with Previous | Blame | View Log

! { dg-do compile }

! PR fortran/37411
! This used to cause an ICE because of a missing array spec after interface
! mapping.

! Contributed by Kristjan Jonasson <jonasson@hi.is>

MODULE B1
CONTAINS
  subroutine sub()
    integer :: x(1)
    character(3) :: st
    st = fun(x)
  end subroutine sub

  function fun(x) result(st)
    integer, intent(in) :: x(1)
    character(lenf(x)) :: st
    st = 'abc'
  end function fun

  pure integer function lenf(x)
    integer, intent(in) :: x(1)
    lenf = x(1)
  end function lenf
END MODULE B1

! { dg-final { cleanup-modules "B1" } }

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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