Commit 058e32b3 by Mark Mitchell Committed by Mark Mitchell

gimplify.c (gimplify_modify_expr_rhs): Use types_compatible_p.

	* gimplify.c (gimplify_modify_expr_rhs): Use types_compatible_p.

	* g++.dg/opt/temp1.C: Make memcpy actually copy bytes.

From-SVN: r92571
parent 05f5e885
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.
......
......@@ -2817,8 +2817,9 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, tree *pre_p,
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.
......
......@@ -15,6 +15,10 @@ int i;
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;
}
......
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