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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [interface_30.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
! PR39850: Too strict checking for procedures as actual argument
4
!
5
! Original test case by Tobias Burnus 
6
! Modified by Janus Weil 
7
 
8
real function func()
9
  print *,"func"
10
  func = 42.0
11
end function func
12
 
13
program test
14
  external func1,func2,func3,func4  ! subroutine or implicitly typed real function
15
  call sub1(func1)
16
  call sub2(func2)
17
  call sub1(func3)
18
  call sub2(func3)  ! { dg-error "is not a subroutine" }
19
  call sub2(func4)
20
  call sub1(func4)  ! { dg-error "is not a function" }
21
contains
22
  subroutine sub1(a1)
23
    interface
24
      real function a1()
25
      end function
26
    end interface
27
    print *, a1()
28
  end subroutine sub1
29
  subroutine sub2(a2)
30
    interface
31
      subroutine a2
32
      end subroutine
33
    end interface
34
    call a2()
35
  end subroutine
36
end
37
 

powered by: WebSVN 2.1.0

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