https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55824
--- Comment #5 from Damian Rouson <damian at sourceryinstitute dot org> --- I'm guessing the code below is another manifestation of the this bug: $ cat ice-on-pack-unlimited-polymorphic.f90 contains subroutine array_to_vector(array) class(*), allocatable :: vector(:),array(:,:) allocate(vector,source=pack(array,.true.)) end subroutine end $ gfortran ice-on-pack-unlimited-polymorphic.f90 ice-on-pack-unlimited-polymorphic.f90:4:0: allocate(vector,source=pack(array,.true.)) 1 internal compiler error: Segmentation fault: 11 ice-on-pack-unlimited-polymorphic.f90:4:0: internal compiler error: Abort trap: 6 gfortran: internal compiler error: Abort trap: 6 (program f951) Please submit a full bug report, with preprocessed source if appropriate. See <https://trac.macports.org/newticket> for instructions. $ gfortran --version GNU Fortran (MacPorts gcc6 6-20150621_0) 6.0.0 20150621 (experimental) ... $ sudo port select --set gcc mp-gcc5 Selecting 'mp-gcc5' for 'gcc' succeeded. 'mp-gcc5' is now active. $ gfortran ice-on-pack-unlimited-polymorphic.f90 ice-on-pack-unlimited-polymorphic.f90:4:13: allocate(vector,source=pack(array,.true.)) 1 Error: Array specification required in ALLOCATE statement at (1)