PR middle-end/40015
* builtins.c (fold_builtin_memory_op): Do not decay to element
type if the size matches the whole array.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147094
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
}
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);
}
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);