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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [pure_byref_1.f90] - Rev 823

Go to most recent revision | Compare with Previous | Blame | View Log

! { dg-do run }
! PR 22607: PURE/ELEMENTAL return-by-reference functions
program main
  implicit none
  character(2), dimension(2) :: a, b
  a = 'ok'
  b = fun(a)
  if (.not.all(b == 'ok')) call abort()
contains
  elemental function fun(a) 
    character(*), intent(in) :: a
    character(len(a)) :: fun
    fun = a
  end function fun
end program main

Go to most recent revision | 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.