summaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-14 17:26:17 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-14 17:26:17 +0000
commit3597d08115537fa122acf34d69e0a1852b1b6577 (patch)
treefc0f8777cba36f0d14f1ae7a8cd46e926f3d2b0d /gcc/fortran/expr.c
parent41142c530ac47f7302bf8b0f2a4e69726d71a079 (diff)
downloadgcc-3597d08115537fa122acf34d69e0a1852b1b6577.tar.gz
2013-10-14 Tobias Burnus <burnus@net-b.de>
PR fortran/58658 * expr.c (gfc_check_vardef_context): Fix pointer diagnostic for CLASS(*). 2013-10-14 Tobias Burnus <burnus@net-b.de> PR fortran/58658 * gfortran.dg/unlimited_polymorphic_10.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203572 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index b2af32816e5..df96e5b4d35 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -4693,7 +4693,6 @@ gfc_check_vardef_context (gfc_expr* e, bool pointer, bool alloc_obj,
bool is_pointer;
bool check_intentin;
bool ptr_component;
- bool unlimited;
symbol_attribute attr;
gfc_ref* ref;
int i;
@@ -4709,8 +4708,6 @@ gfc_check_vardef_context (gfc_expr* e, bool pointer, bool alloc_obj,
sym = e->value.function.esym ? e->value.function.esym : e->symtree->n.sym;
}
- unlimited = e->ts.type == BT_CLASS && UNLIMITED_POLY (sym);
-
attr = gfc_expr_attr (e);
if (!pointer && e->expr_type == EXPR_FUNCTION && attr.pointer)
{
@@ -4750,7 +4747,7 @@ gfc_check_vardef_context (gfc_expr* e, bool pointer, bool alloc_obj,
/* Find out whether the expr is a pointer; this also means following
component references to the last one. */
is_pointer = (attr.pointer || attr.proc_pointer);
- if (pointer && !is_pointer && !unlimited)
+ if (pointer && !is_pointer)
{
if (context)
gfc_error ("Non-POINTER in pointer association context (%s)"