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: unassig...@gcc.gnu.org
ReportedBy: fmarti...@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