aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/binding_label_tests_13_main.f03
blob: da93a8bbd87d6dd7df5911b1b3d545e888764851 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do compile }
! This file must be compiled AFTER binding_label_tests_13.f03, which it 
! should be because dejagnu will sort the files.  The module file 
! binding_label_tests_13.mod can not be removed until after this test is done.
module binding_label_tests_13_main
  use, intrinsic :: iso_c_binding, only: c_int
  integer(c_int) :: c3  ! { dg-error "Variable c3 from module binding_label_tests_13_main with binding label c3 at .1. uses the same global identifier as entity at .2. from module binding_label_tests_13" }
  bind(c) c3

contains
  subroutine c_sub() BIND(c, name = "C_Sub")
    use binding_label_tests_13 ! { dg-error "Variable c3 from module binding_label_tests_13_main with binding label c3 at .1. uses the same global identifier as entity at .2. from module binding_label_tests_13" }
  end subroutine c_sub
end module binding_label_tests_13_main
! { dg-final { cleanup-modules "binding_label_tests_13" } }