This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/64474] New: transfer(c_null_ptr, ...) causes an internal error
- From: "arjen.markus895 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 02 Jan 2015 15:14:24 +0000
- Subject: [Bug fortran/64474] New: transfer(c_null_ptr, ...) causes an internal error
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64474
Bug ID: 64474
Summary: transfer(c_null_ptr, ...) causes an internal error
Product: gcc
Version: 4.8.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: arjen.markus895 at gmail dot com
I needed to pass a null pointer from Fortran to C. One attempt to do so was via
code like this:
module myinterfaces
use iso_c_binding
implicit none
interface
subroutine croutine( array ) bind(c,name='croutine')
real, dimension(*) :: array
end subroutine
end interface
contains
subroutine myroutine
real, dimension(1) :: dummy
call croutine( transfer(c_null_ptr, dummy) )
end subroutine myroutine
end module myinterfaces
This causes an internal error:
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.