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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [class_array_4.f03] - Blame information for rev 801

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR43214 - implementation of class arrays
3
!
4
! Contributed by Tobias Burnus  
5
!
6
module m
7
  type t
8
    real :: r = 99
9
  contains
10
    procedure, pass :: foo => foo
11
  end type t
12
contains
13
  elemental subroutine foo(x, i)
14
    class(t),intent(in) :: x
15
    integer,intent(inout) :: i
16
    i = x%r + i
17
  end subroutine foo
18
end module m
19
 
20
  use m
21
  type(t) :: x(3)
22
  integer :: n(3) = [0,100,200]
23
  call x(:)%foo(n)
24
  if (any(n .ne. [99,199,299])) call abort
25
end
26
! { dg-final { cleanup-modules "m" } }

powered by: WebSVN 2.1.0

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