[Fortran-Experiments]: patch

Christopher D. Rickett crickett@lanl.gov
Mon Feb 26 16:50:00 GMT 2007


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



More information about the Fortran mailing list