2014-01-28 Paul Thomas <pault@gcc.gnu.org>
commit85596a5e1ffa3e0f86da15cefa422ae8946db736
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jan 2014 20:10:22 +0000 (28 20:10 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jan 2014 20:10:22 +0000 (28 20:10 +0000)
tree848c6bdadc4dc840eac357f9bf8e7960d97c859a
parent91cb463cc12cfe63097f2907bf496573e43b57f4
2014-01-28  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/59414
* trans-stmt.c (gfc_trans_allocate): Before the pointer
assignment to transfer the source _vptr to a class allocate
expression, the final class reference should be exposed. The
tail that includes the _data and array references is stored.
This reduced expression is transferred to 'lhs' and the _vptr
added. Then the tail is restored to the allocate expression.

2014-01-28  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/59414
* gfortran.dg/allocate_class_3.f90 : New test

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207204 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/trans-stmt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/allocate_class_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/elemental_by_value_1.f90 [new file with mode: 0644]