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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! PR46356 - class arrays
3
!
4
! Contributed by Ian Harvey
5
!
6
MODULE procedure_intent_nonsense
7
  IMPLICIT NONE
8
  PRIVATE
9
  TYPE, PUBLIC :: Parent
10
    INTEGER :: comp
11
  END TYPE Parent
12
 
13
  TYPE :: ParentVector
14
    INTEGER :: a
15
    ! CLASS(Parent), ALLOCATABLE :: a
16
  END TYPE ParentVector
17
CONTAINS
18
  SUBROUTINE vector_operation(pvec)
19
    CLASS(ParentVector), INTENT(INOUT) :: pvec(:)
20
    INTEGER :: i
21
    !---
22
    DO i = 1, SIZE(pvec)
23
      CALL item_operation(pvec(i))
24
    END DO
25
    ! PRINT *, pvec(1)%a%comp
26
  END SUBROUTINE vector_operation
27
 
28
  SUBROUTINE item_operation(pvec)
29
    CLASS(ParentVector), INTENT(INOUT) :: pvec
30
    !TYPE(ParentVector), INTENT(INOUT) :: pvec
31
  END SUBROUTINE item_operation
32
END MODULE procedure_intent_nonsense
33
! { dg-final { cleanup-modules "procedure_intent_nonsense" } }

powered by: WebSVN 2.1.0

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