OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [typebound_call_5.f03] - Blame information for rev 437

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
 
3
! Type-bound procedures
4
! Check for correct access-checking on type-bound procedures.
5
 
6
MODULE m
7
  IMPLICIT NONE
8
 
9
  TYPE t
10
  CONTAINS
11
    PROCEDURE, NOPASS, PRIVATE :: priv => proc
12
    PROCEDURE, NOPASS, PUBLIC :: publ => proc
13
  END TYPE t
14
 
15
CONTAINS
16
 
17
  SUBROUTINE proc ()
18
  END SUBROUTINE proc
19
 
20
  ! This is inside the module.
21
  SUBROUTINE test1 ()
22
    IMPLICIT NONE
23
    TYPE(t) :: obj
24
 
25
    CALL obj%priv () ! { dg-bogus "PRIVATE" }
26
    CALL obj%publ ()
27
  END SUBROUTINE test1
28
 
29
END MODULE m
30
 
31
! This is outside the module.
32
SUBROUTINE test2 ()
33
  USE m
34
  IMPLICIT NONE
35
  TYPE(t) :: obj
36
 
37
  CALL obj%priv () ! { dg-error "PRIVATE" }
38
  CALL obj%publ ()
39
END SUBROUTINE test2
40
 
41
! { 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.