https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70673
Bug ID: 70673 Summary: ICE with module containing functions with allocatable character scalars Product: gcc Version: fortran-dev Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: davidgkinniburgh at yahoo dot co.uk Target Milestone: --- module m contains subroutine s character(:), allocatable :: a1 a1 = a1 return contains integer function f1() f1 = 0 end function f1 end subroutine s integer function f2() character(:), allocatable :: a2 f2 = 0 ! this line causes a seg fault! a2 = a2 end function f2 end module m ##################### The above do-nothing construction gives an ICE. Difficult for me to know why but it is probably something to do with the allocatable character scalars. As far as I know, it is legal Fortran. P.S. Thanks Paul, Dominique et al. for the recent push on the these things. gcc version 6.0.0 20160410 (experimental) (GCC) :: mingw build from equation.com running on x86_w64.