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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [c_loc_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
module c_loc_tests_5
3
  use, intrinsic :: iso_c_binding, only: c_char, c_ptr, c_loc, c_int
4
 
5
contains
6
  subroutine sub0() bind(c)
7
    type(c_ptr) :: f_ptr, my_c_ptr
8
    character(kind=c_char, len=20), target :: format
9
    integer(c_int), dimension(:), pointer :: int_ptr
10
    integer(c_int), dimension(10), target :: int_array
11
 
12
    f_ptr = c_loc(format(1:1))
13
 
14
    int_ptr => int_array
15
    my_c_ptr = c_loc(int_ptr(0))
16
 
17
  end subroutine sub0
18
end module c_loc_tests_5
19
! { dg-final { cleanup-modules "c_loc_tests_5" } }

powered by: WebSVN 2.1.0

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