From 90d245c5622d1f805f1936e03331d0b26b1cfd49 Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Thu, 31 Jul 2008 21:42:16 +0000 Subject: [PATCH] * expr.c (expand_assignment): Check for complete type. From-SVN: r138439 --- gcc/ChangeLog | 4 ++++ gcc/expr.c | 1 + 2 files changed, 5 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3823eb634ae..581a3330fcf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2008-07-31 Steve Ellcey + + * expr.c (expand_assignment): Check for complete type. + 2008-07-31 H.J. Lu PR debug/36977 diff --git a/gcc/expr.c b/gcc/expr.c index 4984780fe32..eae8093d61e 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)))) -- 2.30.2