This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/55465] New: Name collision in C binding (calling C from Fortran)
- From: "fmartinez at gmv dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 25 Nov 2012 18:18:52 +0000
- Subject: [Bug fortran/55465] New: Name collision in C binding (calling C from Fortran)
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55465
Bug #: 55465
Summary: Name collision in C binding (calling C from Fortran)
Classification: Unclassified
Product: gcc
Version: 4.7.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: fmartinez@gmv.com
The following compile error is generated. Maybe not a bug but is passes through
the Intel compiler and I cannot see the reason why it would not compile.
Essentially I am trying to use the binding to call from Fortran the same C
function in two different ways. The interface sql_set_env_attr has two
implementations, one sql_set_env_attr_int where the parameter value is passed
as c_int and another one sql_set_env_attr_ptr where the parameter value is
passed as c_ptr.
In any case the message is somewhat misleading as it identifies the name of the
binding SQLSetEnvAttr as global body and as interface body.
Compilation diagnostics follow:
m_odbc_if.f90:168.4:
function sql_set_env_attr_ptr( input_handle, &
1
m_odbc_if.f90:153.4:
function sql_set_env_attr_int( input_handle, &
2
Error: Binding label 'SQLSetEnvAttr' in interface body at (1) collides with the
global entity 'SQLSetEnvAttr' at (2)
make: *** [/home/fmmf/pulsar/Linux/Debug/obj/m_odbc_if.o] Error 1