summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-12 00:57:55 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-12 00:57:55 +0000
commitd18d957a5440396c95e129f360b1dd13a93b4725 (patch)
treedc5bc1335e3a9eec8102f10a6796b72eacee24e6 /gcc/expr.c
parent6019c708aa8918eab873acee36512fb3c1b76b80 (diff)
downloadgcc-d18d957a5440396c95e129f360b1dd13a93b4725.tar.gz
* expr.c (store_expr): In condition for checking if value is
generated in TARGET, move call to expr_size last. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56217 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 5ee1ef36752..123398a901a 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4238,14 +4238,17 @@ store_expr (exp, target, want_value)
|| (temp != target && (side_effects_p (temp)
|| side_effects_p (target))))
&& TREE_CODE (exp) != ERROR_MARK
- /* If there's nothing to copy, don't bother. */
- && expr_size (exp) != const0_rtx
&& ! dont_store_target
/* If store_expr stores a DECL whose DECL_RTL(exp) == TARGET,
but TARGET is not valid memory reference, TEMP will differ
from TARGET although it is really the same location. */
&& (TREE_CODE_CLASS (TREE_CODE (exp)) != 'd'
- || target != DECL_RTL_IF_SET (exp)))
+ || target != DECL_RTL_IF_SET (exp))
+ /* If there's nothing to copy, don't bother. Don't call expr_size
+ unless necessary, because some front-ends (C++) expr_size-hook
+ aborts on objects that are not supposed to be bit-copied or
+ bit-initialized. */
+ && expr_size (exp) != const0_rtx)
{
target = protect_from_queue (target, 1);
if (GET_MODE (temp) != GET_MODE (target)