aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-12-23 21:55:12 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2004-12-23 21:55:12 +0000
commit058e32b336f75d77847ecdd938cb30ff493b9018 (patch)
treefe6597866e3145314348d9f88fb30b8bdf3054fb /gcc/gimplify.c
parent05f5e885564e730c6700bb57abfd75ce734b7e1b (diff)
downloadgcc-058e32b336f75d77847ecdd938cb30ff493b9018.zip
gcc-058e32b336f75d77847ecdd938cb30ff493b9018.tar.gz
gcc-058e32b336f75d77847ecdd938cb30ff493b9018.tar.bz2
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
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 0f610e4..9bf4c4e 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -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;