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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [test_common_binding_labels.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, intrinsic :: iso_c_binding, only: c_double
4
  implicit none
5
 
6
  common /mycom/ r, s ! { dg-error "does not match" }
7
  real(c_double) :: r
8
  real(c_double) :: s
9
  bind(c, name="my_common_block") :: /mycom/
10
end module x
11
 
12
module y
13
  use, intrinsic :: iso_c_binding, only: c_double, c_int
14
  implicit none
15
 
16
  common /mycom/ r, s
17
  real(c_double) :: r
18
  real(c_double) :: s
19
  bind(c, name="my_common_block") :: /mycom/
20
 
21
  common /com2/ i ! { dg-error "does not match" }
22
  integer(c_int) :: i
23
  bind(c, name="") /com2/
24
end module y
25
 
26
module z
27
  use, intrinsic :: iso_c_binding, only: c_double, c_int
28
  implicit none
29
 
30
  common /mycom/ r, s ! { dg-error "does not match" }
31
  real(c_double) :: r
32
  real(c_double) :: s
33
  ! this next line is an error; if a common block is bind(c), the binding label
34
  ! for it must match across all scoping units that declare it.
35
  bind(c, name="my_common_block_2") :: /mycom/
36
 
37
  common /com2/ i ! { dg-error "does not match" }
38
  integer(c_int) :: i
39
  bind(c, name="mycom2") /com2/
40
end module z
41
 
42
! { dg-final { cleanup-modules "x y" } }

powered by: WebSVN 2.1.0

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