This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50585] New: ICE with assumed length character array argument
- From: "sgm at objexx dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 01 Oct 2011 07:36:15 +0000
- Subject: [Bug fortran/50585] New: ICE with assumed length character array argument
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: sgm@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