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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [bind_c_usage_7.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 x
3
  use iso_c_binding
4
  implicit none
5
contains
6
  function bar() bind(c) ! { dg-error "cannot be an array" }
7
    integer(c_int) :: bar(5)
8
  end function bar
9
 
10
  function my_string_func() bind(c) ! { dg-error "cannot be a character string" }
11
    character(kind=c_char, len=10) :: my_string_func
12
    my_string_func = 'my_string' // C_NULL_CHAR
13
  end function my_string_func
14
end module x
15
 
16
! { dg-final { cleanup-modules "x" } }

powered by: WebSVN 2.1.0

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