aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2016-11-13 10:56:10 +0100
committerJanus Weil <janus@gcc.gnu.org>2016-11-13 10:56:10 +0100
commit9cbf8673106e24e33f2ab2ed9a054c3a759d84e1 (patch)
tree64c45c010d747e598543fbee00fee803369db4e8 /gcc/fortran/resolve.c
parent559f2bbc362f311ab424232e72bb4f9f601b54eb (diff)
downloadgcc-9cbf8673106e24e33f2ab2ed9a054c3a759d84e1.zip
gcc-9cbf8673106e24e33f2ab2ed9a054c3a759d84e1.tar.gz
gcc-9cbf8673106e24e33f2ab2ed9a054c3a759d84e1.tar.bz2
re PR fortran/66366 ([OOP] ICE on invalid with non-allocatable CLASS variable)
2016-11-13 Janus Weil <janus@gcc.gnu.org> PR fortran/66366 * resolve.c (resolve_component): Move check for C437 to ... * decl.c (build_struct): ... here. Fix indentation. 2016-11-13 Janus Weil <janus@gcc.gnu.org> PR fortran/66366 * gfortran.dg/class_57.f90: Changed error message. * gfortran.dg/class_60.f90: New test. From-SVN: r242351
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index faf7dde..c85525a 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -13587,19 +13587,6 @@ resolve_component (gfc_component *c, gfc_symbol *sym)
return false;
}
- /* C437. */
- if (c->ts.type == BT_CLASS && c->attr.flavor != FL_PROCEDURE
- && (!c->attr.class_ok
- || !(CLASS_DATA (c)->attr.class_pointer
- || CLASS_DATA (c)->attr.allocatable)))
- {
- gfc_error ("Component %qs with CLASS at %L must be allocatable "
- "or pointer", c->name, &c->loc);
- /* Prevent a recurrence of the error. */
- c->ts.type = BT_UNKNOWN;
- return false;
- }
-
/* If an allocatable component derived type is of the same type as
the enclosing derived type, we need a vtable generating so that
the __deallocate procedure is created. */