aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-11-16 11:58:53 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2017-11-16 11:58:53 +0000
commit115902984185e7056652c58b2069d6253517c9b9 (patch)
treef62be0e56cd1e065ea16e2d1ce4e6011ff8b8300 /gcc/expr.c
parent76a2e9c7ffd7d7a426ab9c614c7845fe265c4fe7 (diff)
Merge branches/gcc-7-branch rev 254792.
Change-Id: I67684002abf84c64d0e873a8044b211923c56499
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index e43969f61a5..461f94ba2d7 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6742,8 +6742,11 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
return const0_rtx;
/* If we have nothing to store, do nothing unless the expression has
- side-effects. */
- if (bitsize == 0)
+ side-effects. Don't do that for zero sized addressable lhs of
+ calls. */
+ if (bitsize == 0
+ && (!TREE_ADDRESSABLE (TREE_TYPE (exp))
+ || TREE_CODE (exp) != CALL_EXPR))
return expand_expr (exp, const0_rtx, VOIDmode, EXPAND_NORMAL);
if (GET_CODE (target) == CONCAT)