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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [result_in_spec_2.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Tests the fix for PR32047, in which the null agument
3
! function for the character length would cause an ICE.
4
!
5
! Contributed by Tobias Burnus 
6
!
7
module test1
8
  implicit none
9
contains
10
  character(f()) function test2() result(r)
11
    interface
12
      pure function f()
13
        integer f
14
      end function f
15
    end interface
16
    r = '123'
17
  end function test2
18
end module test1
19
 
20
pure function f()
21
  integer :: f
22
  f = 3
23
end function f
24
 
25
program test
26
  use test1
27
  implicit none
28
  if(len (test2()) /= 3) call abort ()
29
  if(test2() /= '123') call abort ()
30
end program test
31
! { dg-final { cleanup-modules "test1" } }

powered by: WebSVN 2.1.0

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