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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [gfortran.dg/] [proc_ptr_comp_15.f90] - Blame information for rev 581

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
!
3
! PR 41106: [F03] Procedure Pointers with CHARACTER results
4
!
5
! Contributed by Tobias Burnus 
6
 
7
module m
8
 type :: t
9
 procedure(character(len=5)), pointer, nopass :: ptr
10
 end type
11
contains
12
 function abc()
13
  character(len=5) :: abc
14
  abc = 'abcde'
15
 end function abc
16
end module m
17
 
18
use m
19
 type(t) :: x
20
 character(len=5) :: str
21
 x%ptr => abc
22
 print *,x%ptr()
23
 str = x%ptr()
24
 if (str/='abcde') call abort()
25
end
26
 
27
! { dg-final { cleanup-modules "m" } }
28
 

powered by: WebSVN 2.1.0

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