diff options
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index c01378515f6..2f58cd2a236 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -4643,7 +4643,10 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) highest_pow2_factor (offset)); } - if (TREE_READONLY (field)) + /* If the constructor has been cleared, setting RTX_UNCHANGING_P + on the MEM might lead to scheduling the clearing after the + store. */ + if (TREE_READONLY (field) && !cleared) { if (GET_CODE (to_rtx) == MEM) to_rtx = copy_rtx (to_rtx); |