re PR fortran/30073 (Array out of bounds gives name of RHS array not LHS array)
PR fortran/30073 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant block of code. Set name to the variable associated with the descriptor. From-SVN: r158392
This commit is contained in:
parent
58c8f7700a
commit
e3e529d14c
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/30073
|
||||
* trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
|
||||
block of code. Set name to the variable associated with the descriptor.
|
||||
|
||||
2010-04-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
|
||||
|
|
|
@ -2324,10 +2324,6 @@ gfc_trans_array_bound_check (gfc_se * se, tree descriptor, tree index, int n,
|
|||
&& se->loop->ss->loop_chain->expr->symtree)
|
||||
name = se->loop->ss->loop_chain->expr->symtree->name;
|
||||
|
||||
if (!name && se->loop && se->loop->ss && se->loop->ss->loop_chain
|
||||
&& se->loop->ss->loop_chain->expr->symtree)
|
||||
name = se->loop->ss->loop_chain->expr->symtree->name;
|
||||
|
||||
if (!name && se->loop && se->loop->ss && se->loop->ss->expr)
|
||||
{
|
||||
if (se->loop->ss->expr->expr_type == EXPR_FUNCTION
|
||||
|
@ -2339,6 +2335,9 @@ gfc_trans_array_bound_check (gfc_se * se, tree descriptor, tree index, int n,
|
|||
name = "unnamed constant";
|
||||
}
|
||||
|
||||
if (descriptor->base.code != COMPONENT_REF)
|
||||
name = IDENTIFIER_POINTER (DECL_NAME (descriptor));
|
||||
|
||||
/* If upper bound is present, include both bounds in the error message. */
|
||||
if (check_upper)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue