2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / binding_label_tests_4.f03
blob69db9756f6e2a02d424e97744400e780526c6782
1 ! { dg-do compile }
2 module A
3   use, intrinsic :: iso_c_binding
4 contains
5   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." }
6     print *, 'hello from pA'
7   end subroutine pA
8 end module A
10 module B
11   use, intrinsic :: iso_c_binding
13 contains
14   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." }
15     print *, 'hello from pB'
16   end subroutine pB
17 end module B
19 module C
20 use A
21 use B ! { dg-error "Can't open module file" }
22 end module C
23 ! { dg-excess-errors "compilation terminated" }