From 150524cd4548de6c285f657c7362d83028b327d2 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Thu, 18 Jan 2007 18:19:39 +0000 Subject: 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 --- gcc/fortran/trans-expr.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/fortran/trans-expr.c') 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; } -- cgit v1.1