aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/dump-parse-tree.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2010-04-06 20:16:13 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2010-04-06 20:16:13 +0200
commitbe59db2d47d5de2c73132b9ea45bdfa7692a4bd8 (patch)
tree5e7fce8dfc8a026d1df286f7a6b7e2340402829b /gcc/fortran/dump-parse-tree.c
parent385e8144121c9dfc0f8eb1a096db3e68183246bb (diff)
downloadgcc-be59db2d47d5de2c73132b9ea45bdfa7692a4bd8.zip
gcc-be59db2d47d5de2c73132b9ea45bdfa7692a4bd8.tar.gz
gcc-be59db2d47d5de2c73132b9ea45bdfa7692a4bd8.tar.bz2
re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
2010-04-06 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * array.c (gfc_free_array_spec,gfc_resolve_array_spec, match_array_element_spec,gfc_copy_array_spec, gfc_compare_array_spec): Include corank. (match_array_element_spec,gfc_set_array_spec): Support codimension. * decl.c (build_sym,build_struct,variable_decl, match_attr_spec,attr_decl1,cray_pointer_decl, gfc_match_volatile): Add codimension. (gfc_match_codimension): New function. * dump-parse-tree.c (show_array_spec,show_attr): Support * codimension. * gfortran.h (symbol_attribute,gfc_array_spec): Ditto. (gfc_add_codimension): New function prototype. * match.h (gfc_match_codimension): New function prototype. (gfc_match_array_spec): Update prototype * match.c (gfc_match_common): Update gfc_match_array_spec call. * module.c (MOD_VERSION): Bump. (mio_symbol_attribute): Support coarray attributes. (mio_array_spec): Add corank support. * parse.c (decode_specification_statement,decode_statement, parse_derived): Add coarray support. * resolve.c (resolve_formal_arglist, was_declared, is_non_constant_shape_array, resolve_fl_variable, resolve_fl_derived, resolve_symbol): Add coarray support. * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr, gfc_build_class_symbol): Add coarray support. (gfc_add_codimension): New function. 2010-04-06 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_4.f90: New test. * gfortran.dg/coarray_5.f90: New test. * gfortran.dg/coarray_6.f90: New test. From-SVN: r158012
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
-rw-r--r--gcc/fortran/dump-parse-tree.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index 6c67e7d..e722ff0 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -141,9 +141,9 @@ show_array_spec (gfc_array_spec *as)
return;
}
- fprintf (dumpfile, "(%d", as->rank);
+ fprintf (dumpfile, "(%d [%d]", as->rank, as->corank);
- if (as->rank != 0)
+ if (as->rank + as->corank > 0)
{
switch (as->type)
{
@@ -157,7 +157,7 @@ show_array_spec (gfc_array_spec *as)
}
fprintf (dumpfile, " %s ", c);
- for (i = 0; i < as->rank; i++)
+ for (i = 0; i < as->rank + as->corank; i++)
{
show_expr (as->lower[i]);
fputc (' ', dumpfile);
@@ -591,6 +591,8 @@ show_attr (symbol_attribute *attr)
fputs (" ALLOCATABLE", dumpfile);
if (attr->asynchronous)
fputs (" ASYNCHRONOUS", dumpfile);
+ if (attr->codimension)
+ fputs (" CODIMENSION", dumpfile);
if (attr->dimension)
fputs (" DIMENSION", dumpfile);
if (attr->external)