This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49648] ICE(segfault) with MATHMUL and function-result actual argument
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 5 Jul 2011 17:14:50 +0000
- Subject: [Bug fortran/49648] ICE(segfault) with MATHMUL and function-result actual argument
- Auto-submitted: auto-generated
- References: <bug-49648-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49648
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-05 17:14:31 UTC ---
At some point, the array spec seems to got lost:
COMPLEX,SAVE,ALLOCATABLE::P(:)
COMPLEX:: PM(SIZE(P),SIZE(P))
We have:
(gdb) p expr->expr_type
$1 = EXPR_VARIABLE
(gdb) p expr->symtree->n.sym->name
$2 = 0x2aaaaab42fb8 "p"
(gdb) p expr->ref->type
$4 = REF_ARRAY
(gdb) p expr->ref->u.ar
$5 = {type = AR_FULL, dimen = 0, [...] as = 0x0, [...]}
And in gfc_walk_variable_expr's switch (ar->type):
case AR_FULL:
[...]
newss->data.info.dimen = ar->as->rank;
which is a NULL pointer access.
The question is: Why is ar->as == NULL?