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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-additional-sources c_loc_driver.c }
3
module c_loc_test
4
implicit none
5
 
6
contains
7
  subroutine test0() bind(c)
8
    use, intrinsic :: iso_c_binding
9
    implicit none
10
    integer, target :: x
11
    type(c_ptr) :: my_c_ptr
12
    interface
13
       subroutine test_address(x, expected_value) bind(c)
14
         use, intrinsic :: iso_c_binding
15
         type(c_ptr), value :: x
16
         integer(c_int), value :: expected_value
17
       end subroutine test_address
18
    end interface
19
    x = 100
20
    my_c_ptr = c_loc(x)
21
    call test_address(my_c_ptr, 100)
22
  end subroutine test0
23
end module c_loc_test
24
! { dg-final { cleanup-modules "c_loc_test" } }

powered by: WebSVN 2.1.0

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