* trans-expr.c (is_zero_initializer_p): Determine whether a given
commit67313c34cc78649a549bfac9e2c4fcab34c70c98
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Dec 2006 17:23:43 +0000 (20 17:23 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Dec 2006 17:23:43 +0000 (20 17:23 +0000)
tree2deff0c64810fea5035bf5058aeb42b4c126396b
parentfe2ebfc850445a2622434cff7771bab38233fbd6
* trans-expr.c (is_zero_initializer_p): Determine whether a given
constant expression is a zero initializer.
(gfc_trans_zero_assign): New function to attempt to optimize
"a(:) = 0.0" as a call to __builtin_memset (a, 0, sizeof(a));
(gfc_trans_assignment): Special case array assignments to a
zero initializer constant, using gfc_trans_zero_assign.

* gfortran.dg/array_memset_1.f90: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120078 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/array_memset_1.f90 [new file with mode: 0644]