diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-01-28 17:57:28 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-01-28 17:57:28 +0100 |
commit | 3bfe6da98d7a070dcc5531b35dc74b12b5e602aa (patch) | |
tree | f4a543b8d7885ccccb2a7c8d3a40f5b7ac458c8a /gcc/fortran | |
parent | ce590933fe3c617e15fb1efe4f5e9ddc1dfafbfb (diff) | |
download | gcc-3bfe6da98d7a070dcc5531b35dc74b12b5e602aa.zip gcc-3bfe6da98d7a070dcc5531b35dc74b12b5e602aa.tar.gz gcc-3bfe6da98d7a070dcc5531b35dc74b12b5e602aa.tar.bz2 |
re PR fortran/51972 ([OOP] Wrong code as _copy does not honor CLASS components)
2012-01-28 Tobias Burnus <burnus@net-b.de>
PR fortran/51972
* trans-stmt.c (gfc_trans_allocate): Properly check whether
we have a BT_CLASS which needs to be memset.
2012-01-28 Tobias Burnus <burnus@net-b.de>
PR fortran/51972
* gfortran.dg/class_allocate_12.f90: New.
From-SVN: r183668
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-stmt.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b1e9402..076f048 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2012-01-28 Tobias Burnus <burnus@net-b.de> + + PR fortran/51972 + * trans-stmt.c (gfc_trans_allocate): Properly check whether + we have a BT_CLASS which needs to be memset. + 2012-01-27 Tobias Burnus <burnus@net-b.de> PR fortran/52022 diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index f264bf9..7a6f8b2 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -4950,7 +4950,8 @@ gfc_trans_allocate (gfc_code * code) else gfc_allocate_using_malloc (&se.pre, se.expr, memsz, stat); - if (expr->ts.type == BT_DERIVED && expr->ts.u.derived->attr.alloc_comp) + if (al->expr->ts.type == BT_DERIVED + && expr->ts.u.derived->attr.alloc_comp) { tmp = build_fold_indirect_ref_loc (input_location, se.expr); tmp = gfc_nullify_alloc_comp (expr->ts.u.derived, tmp, 0); |