[Bug fortran/34643] New: ICE with c_f_pointer
francois dot jacq at irsn dot fr
gcc-bugzilla@gcc.gnu.org
Wed Jan 2 16:21:00 GMT 2008
Compilation of the following test program :
[lcoul@b04p0004 test]$ gfortran -c test5.f90
test5.f90: In function Âget_valuesÂ:
test5.f90:30: internal compiler error: Erreur de segmentation
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
MODULE test
USE iso_c_binding
IMPLICIT NONE
PRIVATE
PUBLIC get_values
TYPE,BIND(C) :: my_type
INTEGER(C_INT) :: name
INTEGER(C_INT) :: value
END TYPE
INTERFACE
SUBROUTINE get_from_c(n,p) BIND(C,name="get_from_c")
USE iso_c_binding
INTEGER(C_INT),INTENT(out) :: n
TYPE(C_PTR),INTENT(out) :: p
END
END INTERFACE
CONTAINS
SUBROUTINE get_values(values)
INTEGER,POINTER :: values(:)
TYPE(C_PTR) :: p
INTEGER :: n
TYPE(my_type),POINTER :: d(:)
CALL get_from_c(n,p)
CALL C_F_POINTER(p,d,(/n/))
values => d(:)%value
END SUBROUTINE
END MODULE
--
Summary: ICE with c_f_pointer
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: francois dot jacq at irsn dot fr
GCC build triplet: 20080102 (experimental) [trunk revision 131253]
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: GNU Fortran (GCC) 4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34643
More information about the Gcc-bugs
mailing list