diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-27 21:24:01 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-27 21:24:01 +0000 |
commit | 147b2f9b6dbfa35e5ec8f87e4eee23bf8ba042e4 (patch) | |
tree | d710a896ffd59a5b49bb3d8aeed4e52002ce8bd5 /gcc/fortran/trans-expr.c | |
parent | 4e03fd0d699b62d6a852b19e5e55b254d1159a43 (diff) | |
download | gcc-147b2f9b6dbfa35e5ec8f87e4eee23bf8ba042e4.tar.gz |
2016-01-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69385
* trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
for allocatable components, whilst checking if the symbol is a
derived or class entity..
2015-01-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69385
* gfortran.dg/alloc_comp_assign_15.f03: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232904 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 5031a37a25a..c5ae4c53910 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -8901,10 +8901,11 @@ is_scalar_reallocatable_lhs (gfc_expr *expr) && !expr->ref) return true; - /* All that can be left are allocatable components. */ - if ((expr->symtree->n.sym->ts.type != BT_DERIVED + /* All that can be left are allocatable components. However, we do + not check for allocatable components here because the expression + could be an allocatable component of a pointer component. */ + if (expr->symtree->n.sym->ts.type != BT_DERIVED && expr->symtree->n.sym->ts.type != BT_CLASS) - || !expr->symtree->n.sym->ts.u.derived->attr.alloc_comp) return false; /* Find an allocatable component ref last. */ |