GCC Bugzilla – Bug 15976
ICE: assertion failure in trans-array.c
Last modified: 2005-11-11 04:49:10 UTC
The compiler dies with an ICE: n is not defined in the module. Code is invalid. An error message should be generated; not the obituary of the compiler. gfortran -v -c n23.f95 Reading specs from /OPT/32/gcc-2004-06-09/lib/gcc/hppa2.0w-hp-hpux11.11/3.5. 0/specs Configured with: ../configure --enable-languages=c,f95 --prefix=/opt32/gcc-2004-06-09 --with-gmp=/opt32/gmp --with-gnu-as --with-as=/opt32/binutils/bin/as --enable-threads --disable-shared --disable-nls Thread model: posix gcc version 3.5.0 20040611 (experimental) /OPT/32/gcc-2004-06-09/libexec/gcc/hppa2.0w-hp-hpux11.11/3.5.0/f951 n23.f95 -quiet -dumpbase n23.f95 -auxbase n23 -version -o /var/tmp//ccyr8Fge.s GNU F95 version 3.5.0 20040611 (experimental) (hppa2.0w-hp-hpux11.11) compiled by GNU C version 3.5.0 20040611 (experimental). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Assertion failed: onstack, file ../../gcc/fortran/trans-array.c, line 2836 n23.f95:0: internal compiler error: Aborted module propmats integer :: i(n) end module propmats
Confirmed.
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02380.html>.
We now accepts the code slightly.
Subject: Bug 15976 Author: kargl Date: Fri Nov 11 04:44:16 2005 New Revision: 106777 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106777 Log: PR fortran/15976 * resolve.c (resolve_symbol): Disallow automatic arrays in module scope. * gfortran.dg/automatic_module_variable.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/automatic_module_variable.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 15976 Author: kargl Date: Fri Nov 11 04:46:50 2005 New Revision: 106778 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106778 Log: PR fortran/15976 * resolve.c (resolve_symbol): Disallow automatic arrays in module scope. * gfortran.dg/automatic_module_variable.f90: New test. Added: branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/automatic_module_variable.f90 Modified: branches/gcc-4_0-branch/gcc/fortran/ChangeLog branches/gcc-4_0-branch/gcc/fortran/resolve.c branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
Fixed.