Commit fb89e8bd by Tobias Schlüter Committed by Tobias Schlüter

dump-parse-tree.c (gfc_show_array_ref): Print colon only for ranges when dumping array references.

* dump-parse-tree.c (gfc_show_array_ref): Print colon only
for ranges when dumping array references.

From-SVN: r81866
parent cb44ab82
2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* dump-parse-tree.c (gfc_show_array_ref): Print colon only
for ranges when dumping array references.
2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
* decl.c (variable_decl): Always apply default initializer.
......
......@@ -183,18 +183,28 @@ gfc_show_array_ref (gfc_array_ref * ar)
case AR_SECTION:
for (i = 0; i < ar->dimen; i++)
{
/* There are two types of array sections: either the
elements are identified by an integer array ('vector'),
or by an index range. In the former case we only have to
print the start expression which contains the vector, in
the latter case we have to print any of lower and upper
bound and the stride, if they're present. */
if (ar->start[i] != NULL)
gfc_show_expr (ar->start[i]);
gfc_status_char (':');
if (ar->end[i] != NULL)
gfc_show_expr (ar->end[i]);
if (ar->stride[i] != NULL)
if (ar->dimen_type[i] == DIMEN_RANGE)
{
gfc_status_char (':');
gfc_show_expr (ar->stride[i]);
if (ar->end[i] != NULL)
gfc_show_expr (ar->end[i]);
if (ar->stride[i] != NULL)
{
gfc_status_char (':');
gfc_show_expr (ar->stride[i]);
}
}
if (i != ar->dimen - 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment