diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-09-22 19:19:34 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-09-22 19:19:34 -0400 |
commit | 5480a90cce261c757f93682f16d312781705263a (patch) | |
tree | 2653e916db52179c1099b4777447bfa8217bba62 /gcc | |
parent | a0d074e1069cc78ca03c5775149060eec4fa36e9 (diff) | |
download | gcc-5480a90cce261c757f93682f16d312781705263a.zip gcc-5480a90cce261c757f93682f16d312781705263a.tar.gz gcc-5480a90cce261c757f93682f16d312781705263a.tar.bz2 |
(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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/expr.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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. */ |