Bug 15976 - ICE: assertion failure in trans-array.c
: ICE: assertion failure in trans-array.c
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: fortran
: 4.0.0
: P2 normal
: 4.0.3
Assigned To: Not yet assigned to anyone
:
: accepts-invalid, monitored
:
:
  Show dependency treegraph
 
Reported: 2004-06-13 16:17 UTC by Mart Rentmeester
Modified: 2005-11-11 04:49 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-09-04 18:20:28


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Rentmeester 2004-06-13 16:17:02 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
Comment 1 Andrew Pinski 2004-06-13 18:03:41 UTC
Confirmed.
Comment 2 Andrew Pinski 2004-09-23 14:09:52 UTC
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02380.html>.
Comment 3 Andrew Pinski 2004-11-11 05:35:21 UTC
We now accepts the code slightly.
Comment 4 kargl 2005-11-11 04:44:20 UTC
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
Comment 5 kargl 2005-11-11 04:46:55 UTC
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
Comment 6 kargl 2005-11-11 04:49:10 UTC
Fixed.