This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fortran-Experiments]: patch


Hi Tobias,

- bind_c symbol collision:
----------- 1.f90--------
module x
 use iso_c_binding
 implicit none
 integer(c_int), bind(c,name="c_one") :: one
end module x
---------------------------
----------- 2.f90--------
module y
 use iso_c_binding
 implicit none
 integer(c_int), bind(c,name="c_one") :: one
end module y

program main
 use x
 use y
end program main
---------------------------
Does compile with gfortran, but NAG f95 outputs:
 Error: 2.f90: Duplicate binding label 'c_one' for variable ONE of
module Y and variable ONE of module X
On the other hand, neither g95, sunf95 nor ifort 10 give a compile-time
error/warning.

i just checked the patch i sent on Feb. 24, and it does include the gfc_verify_binding_labels function, so it should report the above code as an error. Tobias: i guess i'm not sure why the above is still being accepted by your copy; it's not accepted by my copy of gfortran.


Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]