re PR fortran/19926 ([4.0 only] Incorrect rank with PARAMETER and array element.)
PR fortran/19926 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT for an array; check that sym->as is NULL. Co-Authored-By: Steven G. Kargl <kargls@comast.net> From-SVN: r101161
This commit is contained in:
parent
14ceeb3258
commit
b7263e8f2f
2 changed files with 13 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
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
|
||||
|
|
|
@ -1802,8 +1802,11 @@ gfc_match_rvalue (gfc_expr ** result)
|
|||
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
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue