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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [gfortran.dg/] [bind_c_usage_7.f03] - Rev 581

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

! { dg-do compile }
module x
  use iso_c_binding
  implicit none
contains
  function bar() bind(c) ! { dg-error "cannot be an array" }
    integer(c_int) :: bar(5)
  end function bar

  function my_string_func() bind(c) ! { dg-error "cannot be a character string" }
    character(kind=c_char, len=10) :: my_string_func
    my_string_func = 'my_string' // C_NULL_CHAR
  end function my_string_func
end module x

! { dg-final { cleanup-modules "x" } }

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

powered by: WebSVN 2.1.0

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