OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [bind_c_usage_3.f03] - Blame information for rev 399

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
module test
3
  use, intrinsic :: iso_c_binding
4
 
5
  type, bind(c) :: my_c_type ! { dg-error "BIND.C. derived type" }
6
     integer(c_int), pointer :: ptr ! { dg-error "cannot have the POINTER attribute" }
7
  end type my_c_type
8
 
9
  type, bind(c) :: my_type ! { dg-error "BIND.C. derived type" }
10
     integer(c_int), allocatable :: ptr(:) ! { dg-error "cannot have the ALLOCATABLE attribute" }
11
  end type my_type
12
 
13
  type foo ! { dg-error "must have the BIND attribute" }
14
    integer(c_int) :: p
15
  end type foo
16
 
17
  type(foo), bind(c) :: cp ! { dg-error "is not C interoperable" }
18
  real(c_double), pointer,bind(c) :: p ! { dg-error "cannot have both the POINTER and BIND.C." }
19
end module test

powered by: WebSVN 2.1.0

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