re PR fortran/47189 ([OOP] calling STORAGE_SIZE on a NULL-initialized class pointer)
commit0d87fa8ca8f0ccf7184e7606d60693530d0c4a13
authorJanus Weil <janus@gcc.gnu.org>
Fri, 7 Jan 2011 12:08:21 +0000 (7 13:08 +0100)
committerJanus Weil <janus@gcc.gnu.org>
Fri, 7 Jan 2011 12:08:21 +0000 (7 13:08 +0100)
tree023ebc065d893b6ac71d6d6906442cf961c2e194
parenta14e516339b8d3b5a3a35ec1c6e33e74019bb576
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
gcc/fortran/ChangeLog
gcc/fortran/class.c
gcc/fortran/expr.c
gcc/fortran/gfortran.h
gcc/fortran/resolve.c
gcc/fortran/symbol.c
gcc/fortran/trans-stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/storage_size_3.f08