This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/15370] New: [gfortran] trans-array.c:2882: gfc_trans_auto_array_allocation: Assertion `!((decl)->common.static_flag)' failed.
- From: "jblomqvi at cc dot hut dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 May 2004 21:34:32 -0000
- Subject: [Bug fortran/15370] New: [gfortran] trans-array.c:2882: gfc_trans_auto_array_allocation: Assertion `!((decl)->common.static_flag)' failed.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
~% gfortran -v
Reading specs from /tmp/gcc-ssa/lib/gcc/i686-pc-linux-gnu/3.5-tree-ssa/specs
Configured with: ../gcc/configure --disable-checking --prefix=/tmp/gcc-ssa
--enable-languages=f95 --with-gmp=/usr
Thread model: posix
gcc version 3.5-tree-ssa 20040505 (merged 20040428)
~% gfortran crash2.f95
f951: ../../gcc/gcc/fortran/trans-array.c:2882: gfc_trans_auto_array_allocation:
Assertion `!((decl)->common.static_flag)' failed.
crash2.f95: In function `crasher':
crash2.f95:8: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Source code for crash2.f95:
module crash
implicit none
integer :: N
contains
subroutine crasher()
implicit none
real :: threshold(N,N) = 1.0 ! This causes an ICE
threshold = 1.0
end subroutine crasher
end module crash
Note that this is not valid code, e.g. ifort complains that:
fortcom: Error: crash2.f90, line 8: A data initialization-expr is not valid for
this object. [THRESHOLD]
real :: threshold(N,N) = 1.0
............^
compilation aborted for crash2.f90 (code 1)
--
Summary: [gfortran] trans-array.c:2882:
gfc_trans_auto_array_allocation: Assertion `!((decl)-
>common.static_flag)' failed.
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jblomqvi at cc dot hut dot fi
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15370