* primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
for an array; check that sym->as is NULL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101161
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
+ Steven G. Kargl <kargls@comast.net>
+
+ PR fortran/19926
+ * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
+ for an array; check that sym->as is NULL.
+
+
2005-06-18 Steven G. Kargl <kargls@comcast.net>
* intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
break;
case FL_PARAMETER:
- if (sym->value
- && sym->value->expr_type != EXPR_ARRAY)
+ /* A statement of the form "REAL, parameter :: a(0:10) = 1" will
+ end up here. Unfortunately, sym->value->expr_type is set to
+ EXPR_CONSTANT, and so the if () branch would be followed without
+ the !sym->as check. */
+ if (sym->value && sym->value->expr_type != EXPR_ARRAY && !sym->as)
e = gfc_copy_expr (sym->value);
else
{