This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36476] New: Fortran CHARACTER array triggers ICE
- From: "walter dot zimmer at dlr dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2008 14:04:50 -0000
- Subject: [Bug fortran/36476] New: Fortran CHARACTER array triggers ICE
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code triggers an ICE even with gfortran 4.3.1:
=================================================================
bash$ gfortran -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.3.1/configure --with-pkgversion='DLR MF/AP UPAS
2008-06-09' --with-bugurl=walter.zimmer@dlr.de --prefix=/local/upas/inst-devel
--enable-languages=c,c++,fortran
--with-gmp-include=/local/upas/compile/gmp-4.2.2
--with-gmp-lib=/local/upas/compile/gmp-4.2.2/.libs
--with-mpfr-include=/local/upas/compile/mpfr-2.3.1
--with-mpfr-lib=/local/upas/compile/mpfr-2.3.1/.libs
Thread model: posix
gcc version 4.3.1 (DLR MF/AP UPAS 2008-06-09)
bash$ cat funny.F
SUBROUTINE FUNNY_STRINGS
character*256 STRING
CHARACTER (len=*) MY_STRING(1:3)
PARAMETER ( MY_STRING = (/ "A" , "B", "C" /) )
STRING = MY_STRING(1)
RETURN
END
bash$ gfortran -c funny.F
funny.F: In function ?funny_strings?:
funny.F:1: internal compiler error: in gfc_get_symbol_decl, at
fortran/trans-decl.c:1031
=================================================================
I suspect this is valid code, but at the end this is not the point as an ICE
should not happen here.
Maybe it's related to bug id 36322, as an array is also used there, but the
line number in gfc_get_symbol_decl is different, so I suspect not.
This ICE is also triggered with gfortran 4.3.0 and 4.1.2.
--
Summary: Fortran CHARACTER array triggers ICE
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: walter dot zimmer at dlr dot de
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36476