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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [proc_ptr_22.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 40646: [F03] array-valued procedure pointer components
4
!
5
! Original test case by Charlie Sharpsteen 
6
! Modified by Janus Weil 
7
 
8
module bugTestMod
9
  implicit none
10
  procedure(returnMat), pointer :: pp2
11
contains
12
  function returnMat( a, b ) result( mat )
13
    integer:: a, b
14
    double precision, dimension(a,b):: mat
15
    mat = 1d0
16
  end function returnMat
17
end module bugTestMod
18
 
19
program bugTest
20
  use bugTestMod
21
  implicit none
22
  procedure(returnMat), pointer :: pp
23
  pp => returnMat
24
  if (sum(pp(2,2))/=4) call abort()
25
  pp2 => returnMat
26
  if (sum(pp2(3,2))/=6) call abort()
27
end program bugTest
28
 
29
! { dg-final { cleanup-modules "bugtestmod" } }
30
 

powered by: WebSVN 2.1.0

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