http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48279
Summary: segfault in gfc_check_vardef_context Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: blocker Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: adr...@llnl.gov I have found gfortran 4.6-rc2 (and also svn r171355) to segfault in gfc_check_vardef_context(). The code spans over 3 modules, but I used delta to come up with the following minimal example: $ cat sidl_string_array.F03 module sidl_string_array type sidl_string_1d end type sidl_string_1d interface set module procedure & setg1_p end interface contains subroutine setg1_p(array, index, val) type(sidl_string_1d), intent(inout) :: array end subroutine setg1_p end module sidl_string_array $ cat s_Hard.F03 module s_Hard use sidl_string_array type, bind(c) :: s_Hard_t end type s_Hard_t interface set_d_interface end interface interface get_d_string module procedure get_d_string_p end interface contains ! Derived type member access functions type(sidl_string_1d) function get_d_string_p(s) type(s_Hard_t), intent(in) :: s end function get_d_string_p subroutine set_d_objectArray_p(s, d_objectArray) end subroutine set_d_objectArray_p end module s_Hard $ cat main.F03 subroutine initHard(h, ex) use s_Hard type(s_Hard_t), intent(inout) :: h call set(get_d_string(h), 0, 'Three') end subroutine initHard $ gfortran -c sidl_string_array.F03 -o sidl_string_array.o $ gfortran -c s_Hard.F03 -o s_Hard.o s_Hard.F03:3.27: type, bind(c) :: s_Hard_t 1 Warning: Derived type 's_hard_t' with BIND(C) attribute at (1) is empty, and may be inaccessible by the C companion processor $ gfortran main.F03 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.