This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34187] New: BIND(C): Public generic with private bind(c) specific does not use bind(C) name
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Nov 2007 11:12:35 -0000
- Subject: [Bug fortran/34187] New: BIND(C): Public generic with private bind(c) specific does not use bind(C) name
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
As reported by Chris:
For the following code, the bind(C) is ignored when calling the private
specific subroutine "test" via calling the generic procedure "gen".
Result: The procedure "test_" is called and the linker complains.
If one makes "test" public, it works. As -fdump-parse-tree shows (after
applying the fixes from PR34186), in "main" "test" has the "bind(c)" attribute.
subroutine test() bind(c)
end subroutine test
module mod
private
public :: gen
interface gen
subroutine test() bind(c)
end subroutine test
end interface gen
end module mod
program main
use mod
call gen
end program main
--
Summary: BIND(C): Public generic with private bind(c) specific
does not use bind(C) name
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34187