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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Test that the arg checking for c_funloc verifies the procedures are
3
! C interoperable.
4
module c_funloc_tests_5
5
  use, intrinsic :: iso_c_binding, only: c_funloc, c_funptr
6
contains
7
  subroutine sub0() bind(c)
8
    type(c_funptr) :: my_c_funptr
9
 
10
    my_c_funptr = c_funloc(sub1) ! { dg-error "must be BIND.C." }
11
 
12
    my_c_funptr = c_funloc(func0) ! { dg-error "must be BIND.C." }
13
  end subroutine sub0
14
 
15
  subroutine sub1()
16
  end subroutine sub1
17
 
18
  function func0(desired_retval)
19
    use, intrinsic :: iso_c_binding, only: c_int
20
    integer(c_int), value :: desired_retval
21
    integer(c_int) :: func0
22
    func0 = desired_retval
23
  end function func0
24
end module c_funloc_tests_5
25
 
26
 

powered by: WebSVN 2.1.0

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