Commit ea5cd5f1 by Richard Guenther Committed by Richard Biener

re PR middle-end/40015 (Revision 147083 failed gfortran.dg/array_memcpy_4.f90)

2009-05-04  Richard Guenther  <rguenther@suse.de>

	PR middle-end/40015
	* builtins.c (fold_builtin_memory_op): Do not decay to element
	type if the size matches the whole array.

From-SVN: r147094
parent a967a1b6
2009-05-04 Richard Guenther <rguenther@suse.de>
PR middle-end/40015
* builtins.c (fold_builtin_memory_op): Do not decay to element
type if the size matches the whole array.
2009-05-04 Kazu Hirata <kazu@codesourcery.com>
* expmed.c (synth_mult): When trying out a shift, pass the result
......
......@@ -8970,7 +8970,8 @@ fold_builtin_memory_op (tree dest, tree src, tree len, tree type, bool ignore, i
}
srctype = TREE_TYPE (TREE_TYPE (src));
if (srctype
&& TREE_CODE (srctype) == ARRAY_TYPE)
&& TREE_CODE (srctype) == ARRAY_TYPE
&& !tree_int_cst_equal (TYPE_SIZE_UNIT (srctype), len))
{
srctype = TREE_TYPE (srctype);
STRIP_NOPS (src);
......@@ -8978,7 +8979,8 @@ fold_builtin_memory_op (tree dest, tree src, tree len, tree type, bool ignore, i
}
desttype = TREE_TYPE (TREE_TYPE (dest));
if (desttype
&& TREE_CODE (desttype) == ARRAY_TYPE)
&& TREE_CODE (desttype) == ARRAY_TYPE
&& !tree_int_cst_equal (TYPE_SIZE_UNIT (desttype), len))
{
desttype = TREE_TYPE (desttype);
STRIP_NOPS (dest);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment