[Bug fortran/44814] New: ISO_C_BINDING types inherited from a USEd module are corrupted
jkrahn at nc dot rr dot com
gcc-bugzilla@gcc.gnu.org
Sun Jul 4 18:57:00 GMT 2010
$ cat ptr_bug.f90
module mod1
use iso_c_binding, only: C_ptr
end module mod1
module mod2
use mod1
use iso_c_binding, only: C_NULL_ptr
contains
subroutine bug
type(C_ptr) :: ptr
ptr=C_NULL_ptr
end subroutine bug
end module mod2
$ /usr/local/gfortran/bin/gfortran -c ptr_bug.f90
ptr_bug.f90:10.8:
ptr=C_NULL_ptr
1
Error: Can't convert TYPE(_gfortran_iso_c_binding_c_ptr) to TYPE(c_ptr) at (1)
The inherited name gets an internal "_gfortran_iso_c_binding_" prefix, but the
locally inherited name does not. This is mentioned in bug37829, where it was
suggested to be low priority or even just an enhancement. IMHO, anything that
prevents perfectly valid code form compiling should be at least normal status.
--
Summary: ISO_C_BINDING types inherited from a USEd module are
corrupted
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jkrahn at nc dot rr dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44814
More information about the Gcc-bugs
mailing list