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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [result_in_spec_2.f90] - Rev 414

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

! { dg-do run }
! Tests the fix for PR32047, in which the null agument
! function for the character length would cause an ICE.
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org >
!
module test1
  implicit none
contains
  character(f()) function test2() result(r)
    interface
      pure function f()
        integer f
      end function f
    end interface
    r = '123'
  end function test2
end module test1

pure function f()
  integer :: f
  f = 3
end function f

program test
  use test1
  implicit none
  if(len (test2()) /= 3) call abort ()
  if(test2() /= '123') call abort ()
end program test
! { dg-final { cleanup-modules "test1" } }

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.