aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03
blob: 455726e75d0fe13b186f6ec27172252c089bd03a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
! { dg-do compile }
module A
  use, intrinsic :: iso_c_binding
contains
  subroutine pA() bind(c, name='printf') ! { dg-error "Procedure pb with binding label printf at .1. uses the same global identifier as entity at .2." }
    print *, 'hello from pA'
  end subroutine pA
end module A

module B
  use, intrinsic :: iso_c_binding

contains
  subroutine pB() bind(c, name='printf') ! { dg-error "Procedure pb with binding label printf at .1. uses the same global identifier as entity at .2." }
    print *, 'hello from pB'
  end subroutine pB
end module B

module C
use A
use B ! { dg-error "Can't open module file" }
end module C