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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 39735: procedure pointer assignments: return value is not checked
4
!
5
! Contributed by Janus Weil 
6
 
7
implicit none
8
procedure(real(4)), pointer :: p1
9
procedure(integer), pointer :: p2
10
procedure(sub), pointer :: p3
11
procedure(), pointer :: p4
12
procedure(real(8)),pointer :: p5
13
real(4), external, pointer :: p6
14
 
15
! valid
16
p2 => iabs
17
p3 => sub
18
p4 => p3
19
p6 => p1
20
 
21
! invalid
22
p1 => iabs   ! { dg-error "Type/rank mismatch in return value" }
23
p1 => p2     ! { dg-error "Type/rank mismatch in return value" }
24
p1 => p5     ! { dg-error "Type/rank mismatch in return value" }
25
p6 => iabs   ! { dg-error "Type/rank mismatch in return value" }
26
p4 => p2     ! { dg-error "is not a subroutine" }
27
 
28
contains
29
 
30
  subroutine sub(i)
31
    integer :: i
32
  end subroutine
33
 
34
end
35
 

powered by: WebSVN 2.1.0

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