This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31188] ICE on vector subscript of a parameter array
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Mar 2007 19:31:32 -0000
- Subject: [Bug fortran/31188] ICE on vector subscript of a parameter array
- References: <bug-31188-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2007-03-15 19:31 -------
If one comments out the if block in gfc_simplify_expr (expr.c):
--------------
case EXPR_VARIABLE:
/* Only substitute array parameter variables if we are in an
initialization expression, or we want a subsection. */
if (p->symtree->n.sym->attr.flavor == FL_PARAMETER
&& (gfc_init_expr || p->ref
|| p->symtree->n.sym->value->expr_type != EXPR_ARRAY))
{
if (simplify_parameter_variable (p, type) == FAILURE)
return FAILURE;
break;
}
--------------
The program works as expected. n.sym->name is ivec. I don't understand why ivec
is FL_PARAMETER and not FL_VARIABLE.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31188