array_memcpy_2.f90
559 Bytes
-
trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize array… · a3018753
trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize array assignments split out from gfc_trans_assignment. * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize array assignments split out from gfc_trans_assignment. (gfc_trans_array_copy): New function to implement array to array copies via calls to __builtin_memcpy. (copyable_array_p): New helper function to identify an array of simple/POD types, that may be copied/assigned using memcpy. (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple whole array assignments considered suitable by copyable_array_p. Invoke gfc_trans_assignment_1 to perform the fallback scalarization. * gfortran.dg/array_memcpy_1.f90: New test case. * gfortran.dg/array_memcpy_2.f90: Likewise. From-SVN: r120503
Roger Sayle committed