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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR 47240: [F03] segfault with procedure pointer component
4
!
5
! Contributed by Martien Hulsen 
6
 
7
  type t
8
    procedure (fun), pointer, nopass :: p
9
  end type
10
  type(t) :: x
11
  real, dimension(2) :: r
12
  x%p => fun
13
  r = evaluate (x%p)
14
  if (r(1) /= 5 .and. r(2) /= 6) call abort()
15
contains
16
  function fun ()
17
    real, dimension(2) :: fun
18
    fun = (/ 5, 6 /)
19
  end function
20
  function evaluate ( dummy )
21
    real, dimension(2) :: evaluate
22
    procedure(fun) :: dummy
23
    evaluate = dummy ()
24
  end function
25
end

powered by: WebSVN 2.1.0

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