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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 41873: Bogus Error: ABSTRACT INTERFACE must not be referenced...
4
!
5
! Contributed by Harald Anlauf 
6
 
7
  implicit none
8
 
9
  type, abstract :: abstype
10
  contains
11
    procedure(f), nopass, deferred :: f_bound
12
    procedure(s), nopass, deferred :: s_bound
13
  end type
14
 
15
  abstract interface
16
    real function f ()
17
    end function
18
  end interface
19
 
20
  abstract interface
21
    subroutine s
22
    end subroutine
23
  end interface
24
 
25
contains
26
 
27
  subroutine cg (c)
28
    class(abstype) :: c
29
    print *, f()             ! { dg-error "must not be referenced" }
30
    call s                   ! { dg-error "must not be referenced" }
31
    print *, c%f_bound ()
32
    call c%s_bound ()
33
  end subroutine
34
 
35
end

powered by: WebSVN 2.1.0

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