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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-fcheck=bounds" }
3
!
4
! PR 42804: ICE with -fcheck=bounds and type bound procedure call on array element
5
!
6
! Contributed by Ian Harvey 
7
 
8
MODULE ModA
9
  IMPLICIT NONE
10
  PRIVATE
11
  TYPE, PUBLIC :: A
12
  CONTAINS
13
    PROCEDURE :: Proc => a_proc
14
  END TYPE A
15
CONTAINS
16
  SUBROUTINE a_proc(this, stat)
17
    CLASS(A), INTENT(INOUT) :: this
18
    INTEGER, INTENT(OUT) :: stat
19
    WRITE (*, *) 'a_proc'
20
    stat = 0
21
  END SUBROUTINE a_proc
22
END MODULE ModA
23
 
24
PROGRAM ProgA
25
  USE ModA
26
  IMPLICIT NONE
27
  INTEGER :: ierr
28
  INTEGER :: i
29
  TYPE(A), ALLOCATABLE :: arr(:)
30
  ALLOCATE(arr(2))
31
  DO i = 1, 2
32
    CALL arr(i)%Proc(ierr)
33
  END DO
34
END PROGRAM ProgA
35
 
36
! { dg-final { cleanup-modules "moda" } }

powered by: WebSVN 2.1.0

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