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_12.f03] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! Test for PR 35150, reduced testcases by Tobias Burnus
4
!
5
module test1
6
  use, intrinsic :: iso_c_binding
7
  implicit none
8
contains
9
  subroutine sub1(argv) bind(c,name="sub1")
10
    type(c_ptr), intent(in) :: argv
11
  end subroutine
12
 
13
  subroutine sub2
14
    type(c_ptr), dimension(1), target :: argv = c_null_ptr
15
    character(c_char), dimension(1), target :: s = c_null_char
16
    call sub1(c_loc(argv))
17
  end subroutine
18
end module test1
19
 
20
program test2
21
  use iso_c_binding
22
  type(c_ptr), target, save :: argv
23
  interface
24
    subroutine sub1(argv) bind(c)
25
      import
26
      type(c_ptr) :: argv
27
    end subroutine sub1
28
  end interface
29
  call sub1(c_loc(argv))
30
end program test2
31
!
32
! { dg-final { cleanup-modules "test1" } }

powered by: WebSVN 2.1.0

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