diff options
author | Jakub Jelinek <jakub@gcc.gnu.org> | 2003-12-03 23:40:58 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2003-12-03 23:40:58 +0100 |
commit | 8ecc63eb275e8f67a25c1606abb6ae7231ae724f (patch) | |
tree | 8ce0b0e15aa050323e8012a0063c5c522e24d2b1 /gcc/expr.c | |
parent | 26d86d940ebeffe2e360292bbba54a7d6eb33ef5 (diff) | |
download | gcc-8ecc63eb275e8f67a25c1606abb6ae7231ae724f.zip gcc-8ecc63eb275e8f67a25c1606abb6ae7231ae724f.tar.gz gcc-8ecc63eb275e8f67a25c1606abb6ae7231ae724f.tar.bz2 |
expr.c (store_constructor): Only set RTX_UNCHANGING_P for read-only field if cleared is 0.
* expr.c (store_constructor): Only set RTX_UNCHANGING_P for
read-only field if cleared is 0.
* gcc.dg/20031202-1.c: New test.
From-SVN: r74251
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |