summaryrefslogtreecommitdiff
path: root/gcc/fortran/primary.c
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-18 18:14:57 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-18 18:14:57 +0000
commit94ce0faed5f3c876ed0a8b73d3174f4e2d1d697a (patch)
tree800e25b834dfcf4e2501b24f9bce291d8109d684 /gcc/fortran/primary.c
parent8c56ff5235cfe1be4933ecae7947e505027cf645 (diff)
downloadgcc-94ce0faed5f3c876ed0a8b73d3174f4e2d1d697a.tar.gz
2013-09-15 Tobias Burnus <burnus@net-b.de>
PR fortran/43366 * primary.c (gfc_variable_attr): Also handle codimension. * resolve.c (resolve_ordinary_assign): Add invalid-diagnostic * for polymorphic assignment. 2013-09-15 Tobias Burnus <burnus@net-b.de> PR fortran/43366 * gfortran.dg/class_39.f03: Update dg-error. * gfortran.dg/class_5.f03: Ditto. * gfortran.dg/class_53.f90: Ditto. * gfortran.dg/realloc_on_assign_20.f90: New. * gfortran.dg/realloc_on_assign_21.f90: New. * gfortran.dg/realloc_on_assign_22.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202713 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r--gcc/fortran/primary.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index 1276abb3aa7..80d45eaea12 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -2134,7 +2134,7 @@ check_substring:
symbol_attribute
gfc_variable_attr (gfc_expr *expr, gfc_typespec *ts)
{
- int dimension, pointer, allocatable, target;
+ int dimension, codimension, pointer, allocatable, target;
symbol_attribute attr;
gfc_ref *ref;
gfc_symbol *sym;
@@ -2149,12 +2149,14 @@ gfc_variable_attr (gfc_expr *expr, gfc_typespec *ts)
if (sym->ts.type == BT_CLASS && sym->attr.class_ok)
{
dimension = CLASS_DATA (sym)->attr.dimension;
+ codimension = CLASS_DATA (sym)->attr.codimension;
pointer = CLASS_DATA (sym)->attr.class_pointer;
allocatable = CLASS_DATA (sym)->attr.allocatable;
}
else
{
dimension = attr.dimension;
+ codimension = attr.codimension;
pointer = attr.pointer;
allocatable = attr.allocatable;
}
@@ -2209,11 +2211,13 @@ gfc_variable_attr (gfc_expr *expr, gfc_typespec *ts)
if (comp->ts.type == BT_CLASS)
{
+ codimension = CLASS_DATA (comp)->attr.codimension;
pointer = CLASS_DATA (comp)->attr.class_pointer;
allocatable = CLASS_DATA (comp)->attr.allocatable;
}
else
{
+ codimension = comp->attr.codimension;
pointer = comp->attr.pointer;
allocatable = comp->attr.allocatable;
}
@@ -2228,6 +2232,7 @@ gfc_variable_attr (gfc_expr *expr, gfc_typespec *ts)
}
attr.dimension = dimension;
+ attr.codimension = codimension;
attr.pointer = pointer;
attr.allocatable = allocatable;
attr.target = target;