From 5480a90cce261c757f93682f16d312781705263a Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 22 Sep 1995 19:19:34 -0400 Subject: [PATCH] (expand_builtin... (expand_builtin, case BUILT_IN_MEMCPY): Strip off all NOP_EXPRs from the source and destination nodes, then set MEM_IN_STRUCT_P. From-SVN: r10397 --- gcc/expr.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/gcc/expr.c b/gcc/expr.c index 5e5b3b31c4cb..998303a94eee 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -7784,10 +7784,9 @@ expand_builtin (exp, target, subtarget, mode, ignore) dest_mem = gen_rtx (MEM, BLKmode, memory_address (BLKmode, dest_rtx)); /* There could be a void* cast on top of the object. */ - if (TREE_CODE (dest) == NOP_EXPR) - type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (dest, 0))); - else - type = TREE_TYPE (TREE_TYPE (dest)); + while (TREE_CODE (dest) == NOP_EXPR) + dest = TREE_OPERAND (dest, 0); + type = TREE_TYPE (TREE_TYPE (dest)); MEM_IN_STRUCT_P (dest_mem) = AGGREGATE_TYPE_P (type); src_mem = gen_rtx (MEM, BLKmode, memory_address (BLKmode, @@ -7795,10 +7794,9 @@ expand_builtin (exp, target, subtarget, mode, ignore) ptr_mode, EXPAND_SUM))); /* There could be a void* cast on top of the object. */ - if (TREE_CODE (src) == NOP_EXPR) - type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (src, 0))); - else - type = TREE_TYPE (TREE_TYPE (src)); + while (TREE_CODE (src) == NOP_EXPR) + src = TREE_OPERAND (src, 0); + type = TREE_TYPE (TREE_TYPE (src)); MEM_IN_STRUCT_P (src_mem) = AGGREGATE_TYPE_P (type); /* Copy word part most expediently. */ -- 2.47.2