aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2011-01-07 13:08:21 +0100
committerJanus Weil <janus@gcc.gnu.org>2011-01-07 13:08:21 +0100
commit0d87fa8ca8f0ccf7184e7606d60693530d0c4a13 (patch)
tree023ebc065d893b6ac71d6d6906442cf961c2e194 /gcc/fortran/resolve.c
parenta14e516339b8d3b5a3a35ec1c6e33e74019bb576 (diff)
downloadgcc-0d87fa8ca8f0ccf7184e7606d60693530d0c4a13.zip
gcc-0d87fa8ca8f0ccf7184e7606d60693530d0c4a13.tar.gz
gcc-0d87fa8ca8f0ccf7184e7606d60693530d0c4a13.tar.bz2
re PR fortran/47189 ([OOP] calling STORAGE_SIZE on a NULL-initialized class pointer)
2011-01-07 Janus Weil <janus@gcc.gnu.org> PR fortran/47189 PR fortran/47194 * gfortran.h (gfc_lval_expr_from_sym): Moved prototype. * class.c (gfc_class_null_initializer): Initialize _vptr to declared type. * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c. * resolve.c (resolve_deallocate_expr): _data component will be added at translation stage. * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c. * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type. 2011-01-07 Janus Weil <janus@gcc.gnu.org> PR fortran/47189 PR fortran/47194 * gfortran.dg/storage_size_3.f08: Extended. From-SVN: r168565
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 28fec7d..1d8a7b6 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -6417,12 +6417,6 @@ resolve_deallocate_expr (gfc_expr *e)
if (gfc_check_vardef_context (e, false, _("DEALLOCATE object")) == FAILURE)
return FAILURE;
- if (e->ts.type == BT_CLASS)
- {
- /* Only deallocate the DATA component. */
- gfc_add_data_component (e);
- }
-
return SUCCESS;
}