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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [bind_c_procs.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 bind_c_procs
3
  use, intrinsic :: iso_c_binding, only: c_int
4
 
5
  interface
6
     ! warning for my_param possibly not being C interoperable
7
     subroutine my_c_sub(my_param) bind(c) ! { dg-warning "may not be C interoperable" }
8
       integer, value :: my_param
9
     end subroutine my_c_sub
10
 
11
     ! warning for my_c_func possibly not being a C interoperable kind
12
     ! warning for my_param possibly not being C interoperable
13
     ! error message truncated to provide an expression that both warnings
14
     ! should match.
15
     function my_c_func(my_param) bind(c) ! { dg-warning "may not be" }
16
       integer, value :: my_param
17
       integer :: my_c_func
18
     end function my_c_func
19
  end interface
20
 
21
contains
22
  ! warning for my_param possibly not being C interoperable
23
  subroutine my_f03_sub(my_param) bind(c) ! { dg-warning "may not be" }
24
    integer, value :: my_param
25
  end subroutine my_f03_sub
26
 
27
  ! warning for my_f03_func possibly not being a C interoperable kind
28
  ! warning for my_param possibly not being C interoperable
29
  ! error message truncated to provide an expression that both warnings
30
  ! should match.
31
  function my_f03_func(my_param) bind(c) ! { dg-warning "may not be" }
32
    integer, value :: my_param
33
    integer :: my_f03_func
34
    my_f03_func = 1
35
  end function my_f03_func
36
 
37
end module bind_c_procs
38
 
39
! { dg-final { cleanup-modules "bind_c_procs" } }

powered by: WebSVN 2.1.0

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