2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / binding_label_tests_11_main.f03
blob7ee0c8de473c4bb42c7759209f4a118f9994cf15
1 ! { dg-do compile }
2 ! { dg-compile-aux-modules "binding_label_tests_11.f03" }
3 module binding_label_tests_11_main
4   use iso_c_binding, only: c_int
5   implicit none
6 contains
7   function one() bind(c, name="c_one") ! { dg-error "Procedure one with binding label c_one at .1. uses the same global identifier as entity at .2." }
8     integer(c_int) one
9     one = 1
10   end function one
11 end module binding_label_tests_11_main
13 program main
14   use binding_label_tests_11 ! { dg-error "Procedure one with binding label c_one at .1. uses the same global identifier as entity at .2." }
15   use binding_label_tests_11_main
16 end program main
17 ! { dg-final { cleanup-modules "binding_label_tests_11" } }