This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/55465] Name collision in C binding (calling C from Fortran)
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Nov 2012 17:08:20 +0000
- Subject: [Bug fortran/55465] Name collision in C binding (calling C from Fortran)
- Auto-submitted: auto-generated
- References: <bug-55465-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55465
--- Comment #4 from janus at gcc dot gnu.org 2012-11-26 17:08:20 UTC ---
Note: The same behavior occurs with all gfortran versions I tried (4.3, 4.6,
4.7 and trunk).
The check which rejects it is in gfc_verify_binding_labels (resolve.c). It was
committed with the inital ISO_C_BINDING patch:
http://gcc.gnu.org/viewcvs?view=revision&revision=126185
This commit also includes a test case which is basically equivalent to the one
in comment 3 (i.e. two interfaces binding to the same label):
http://gcc.gnu.org/viewcvs/trunk/gcc/testsuite/gfortran.dg/binding_label_tests_3.f03?view=markup
So it seems that this error is indeed triggered on purpose and not by accident.
It may well be that ifort just fails to detect this error (ifort is not exactly
known for good diagnostics). Have you checked other compilers?