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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
 
3
! Type-bound procedures
4
! Test for name collision between type-bound procedures and components.
5
 
6
MODULE testmod
7
  IMPLICIT NONE
8
 
9
  TYPE t
10
    REAL :: comp
11
  CONTAINS
12
    PROCEDURE, NOPASS :: comp => proc ! { dg-error "same name as a component" }
13
  END TYPE t
14
 
15
  TYPE supert
16
    INTEGER :: comp1
17
  CONTAINS
18
    PROCEDURE, NOPASS :: comp2 => proc
19
  END TYPE supert
20
 
21
  TYPE, EXTENDS(supert) :: subt1
22
    INTEGER :: comp2 ! { dg-error "same name" }
23
  END TYPE subt1
24
 
25
  TYPE, EXTENDS(supert) :: subt2
26
  CONTAINS
27
    PROCEDURE, NOPASS :: comp1 => proc ! { dg-error "same name as an inherited component" }
28
  END TYPE subt2
29
 
30
CONTAINS
31
 
32
  SUBROUTINE proc ()
33
  END SUBROUTINE proc
34
 
35
END MODULE testmod
36
 
37
! { dg-final { cleanup-modules "testmod" } }

powered by: WebSVN 2.1.0

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