aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2008-07-31 21:42:16 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2008-07-31 21:42:16 +0000
commit90d245c5622d1f805f1936e03331d0b26b1cfd49 (patch)
tree5a7b739faba6db2401809541f1a8182f81f808de /gcc/expr.c
parentd2d93c32dc020c143ca5ffc8b72969cbef530778 (diff)
downloadgcc-90d245c5622d1f805f1936e03331d0b26b1cfd49.zip
gcc-90d245c5622d1f805f1936e03331d0b26b1cfd49.tar.gz
gcc-90d245c5622d1f805f1936e03331d0b26b1cfd49.tar.bz2
* expr.c (expand_assignment): Check for complete type.
From-SVN: r138439
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 4984780..eae8093 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4280,6 +4280,7 @@ expand_assignment (tree to, tree from, bool nontemporal)
needs to be done. Handling this in the normal way is safe because no
computation is done before the call. */
if (TREE_CODE (from) == CALL_EXPR && ! aggregate_value_p (from, from)
+ && COMPLETE_TYPE_P (TREE_TYPE (from))
&& TREE_CODE (TYPE_SIZE (TREE_TYPE (from))) == INTEGER_CST
&& ! ((TREE_CODE (to) == VAR_DECL || TREE_CODE (to) == PARM_DECL)
&& REG_P (DECL_RTL (to))))