------- Comment #1 from dominiq at lps dot ens dot fr  2010-05-20 08:52 -------
Confirmed. Note that as such the code is invalid (dim is not set), but adding a
line "dim=10" does not remove the ICE. The backtrace is:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x000000010007dd6c in resolve_allocate_deallocate (code=0x141816470, fcn=<value
temporarily unavailable, due to optimizations>) at
../../work/gcc/fortran/resolve.c:6097
6097      if (e2->ref && e1->rank != e2->ref->u.ar.as->rank)
(gdb) bt
#0  0x000000010007dd6c in resolve_allocate_deallocate (code=0x141816470,
fcn=<value temporarily unavailable, due to optimizations>) at
../../work/gcc/fortran/resolve.c:6097
#1  0x0000000100084867 in resolve_code (code=<value temporarily unavailable,
due to optimizations>, ns=0x142078200) at ../../work/gcc/fortran/resolve.c:8450
#2  0x0000000100085f46 in resolve_codes (ns=0x142078200) at
../../work/gcc/fortran/resolve.c:12777
#3  0x000000010007864e in gfc_resolve (ns=0x142078200) at
../../work/gcc/fortran/resolve.c:12804
#4  0x000000010006c6e3 in gfc_parse_file () at
../../work/gcc/fortran/parse.c:4292
#5  0x00000001000a58dc in gfc_be_parse_file (set_yydebug=<value temporarily
unavailable, due to optimizations>) at ../../work/gcc/fortran/f95-lang.c:239
#6  0x00000001006dc0c1 in toplev_main (argc=2, argv=0x7fff5fbfd9d0) at
../../work/gcc/toplev.c:1047
#7  0x00000001000010e4 in start ()

Replacing

allocate(this%list(dim0),source=[(i,i=1,dim0)])

with

dim = 10
allocate(this%list(dim))
this%list = [(i,i=1,dim)]

works.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44207

Reply via email to