aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2007-01-18 18:19:39 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2007-01-18 18:19:39 +0000
commit150524cd4548de6c285f657c7362d83028b327d2 (patch)
treee2b763ed862eb208329b1987c53c8a55019a7955 /gcc/fortran/trans-expr.c
parent3bf783b7e2095210aaee3da1e797b4348b796896 (diff)
downloadgcc-150524cd4548de6c285f657c7362d83028b327d2.zip
gcc-150524cd4548de6c285f657c7362d83028b327d2.tar.gz
gcc-150524cd4548de6c285f657c7362d83028b327d2.tar.bz2
trans-expr.c (copyable_array_p): Consider user derived types without allocatable components to be copyable.
* trans-expr.c (copyable_array_p): Consider user derived types without allocatable components to be copyable. * gfortran.dg/array_memcpy_4.f90: New test case. From-SVN: r120906
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index c6ebf3e..3f186a1 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -3815,6 +3815,12 @@ copyable_array_p (gfc_expr * expr)
case BT_LOGICAL:
return true;
+ case BT_CHARACTER:
+ return false;
+
+ case BT_DERIVED:
+ return !expr->ts.derived->attr.alloc_comp;
+
default:
break;
}