This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/64474] New: transfer(c_null_ptr, ...) causes an internal error


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]