allocatable components to be copyable.
* gfortran.dg/array_memcpy_4.f90: New test case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120906
138bc75d-0d04-0410-961f-
82ee72b054a4
2007-01-18 Roger Sayle <roger@eyesopen.com>
+ * trans-expr.c (copyable_array_p): Consider user derived types without
+ allocatable components to be copyable.
+
+2007-01-18 Roger Sayle <roger@eyesopen.com>
+
* trans-stmt.c (compute_overall_iter_number): Enhance to precompute
the number of interations in unconditional FORALL nests with constant
bounds.
case BT_LOGICAL:
return true;
+ case BT_CHARACTER:
+ return false;
+
+ case BT_DERIVED:
+ return !expr->ts.derived->attr.alloc_comp;
+
default:
break;
}
+2007-01-18 Roger Sayle <roger@eyesopen.com>
+
+ * gfortran.dg/array_memcpy_4.f90: New test case.
+
2007-01-18 Josh Conner <jconner@apple.com>
PR target/30485
--- /dev/null
+! { dg-do compile }
+! { dg-options "-O2 -fdump-tree-original" }
+ type t
+ logical valid
+ integer :: x, y
+ end type
+ type (t) :: s(5)
+ type (t) :: d(5)
+
+ d = s
+end
+! { dg-final { scan-tree-dump-times "d = " 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }