2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / binding_label_tests_13_main.f03
blobda93a8bbd87d6dd7df5911b1b3d545e888764851
1 ! { dg-do compile }
2 ! This file must be compiled AFTER binding_label_tests_13.f03, which it 
3 ! should be because dejagnu will sort the files.  The module file 
4 ! binding_label_tests_13.mod can not be removed until after this test is done.
5 module binding_label_tests_13_main
6   use, intrinsic :: iso_c_binding, only: c_int
7   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" }
8   bind(c) c3
10 contains
11   subroutine c_sub() BIND(c, name = "C_Sub")
12     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" }
13   end subroutine c_sub
14 end module binding_label_tests_13_main
15 ! { dg-final { cleanup-modules "binding_label_tests_13" } }