* gimplify.c (gimplify_modify_expr_rhs): Use types_compatible_p.
* g++.dg/opt/temp1.C: Make memcpy actually copy bytes.
From-SVN: r92571
+2004-12-23 Mark Mitchell <mark@codesourcery.com>
+
+ * gimplify.c (gimplify_modify_expr_rhs): Use types_compatible_p.
+
2004-12-23 DJ Delorie <dj@redhat.com>
* genrecog.c (did_you_mean_codes): New.
pointer = TREE_OPERAND (*from_p, 0);
STRIP_NOPS (pointer);
if (TREE_CODE (pointer) == ADDR_EXPR
- && (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (pointer, 0)))
- == TYPE_MAIN_VARIANT (TREE_TYPE (*from_p))))
+ && (lang_hooks.types_compatible_p
+ (TREE_TYPE (TREE_OPERAND (pointer, 0)),
+ TREE_TYPE (*from_p))))
{
*from_p = TREE_OPERAND (pointer, 0);
ret = GS_OK;
+2004-12-23 Mark Mitchell <mark@codesourcery.com>
+
+ * g++.dg/opt/temp1.C: Make memcpy actually copy bytes.
+
2004-12-23 Alexandre Oliva <aoliva@redhat.com>
* gcc.dg/empty2.c: Add missing dg-warning.
extern "C"
void *memcpy (void *dest, const void *src, __SIZE_TYPE__ n)
{
+ char *d = (char *) dest;
+ const char *s = (const char *) src;
+ while (n--)
+ d[n] = s[n];
++i;
}