http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50585
Bug #: 50585 Summary: ICE with assumed length character array argument Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: s...@objexx.com Compiling these 2 routines in the same source file with gfortran -c SUBROUTINE SUB1( str ) IMPLICIT NONE CHARACTER(len=*) :: str(2) CALL SUB2( str(1)(:3) ) END SUBROUTINE SUB1 SUBROUTINE SUB2( str ) IMPLICIT NONE CHARACTER(*) :: str END SUBROUTINE SUB2 gives this ICE: f951: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. with gfortran 4.6.1 on Fedora 15 (x64) and with MinGW on Win32. The problem was also observed on 4.6.0 on Fedora 15 but was not seen on 4.5.x. The ICE does not occur if any of these are true: -fno-whole-file is used The routines are in separate files The str array is changed to a scalar The str length is changed to a constant