diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2003-11-13 10:48:36 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2003-11-13 09:48:36 +0000 |
commit | d76bc29c91f1807418195a4af051d0d1415837bc (patch) | |
tree | e18cb1e9c8eac18b1da0b500eb5f4e9161f56dbe /gcc/expr.c | |
parent | 239ca41f81ff35e8c32fadd93ef2ef3c69d67a7e (diff) | |
download | gcc-d76bc29c91f1807418195a4af051d0d1415837bc.zip gcc-d76bc29c91f1807418195a4af051d0d1415837bc.tar.gz gcc-d76bc29c91f1807418195a4af051d0d1415837bc.tar.bz2 |
re PR rtl-optimization/12926 (Wrong value after assignment in initialize list using bit-fields)
PR optimization/12926
* expr.c (expand_assignment) [COMPONENT_REF]: Don't put
the UNCHANGING_RTX_P flag on memory references to read-only
components that are not addressable.
From-SVN: r73542
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3826,7 +3826,11 @@ expand_assignment (tree to, tree from, int want_value) } if (TREE_CODE (to) == COMPONENT_REF - && TREE_READONLY (TREE_OPERAND (to, 1))) + && TREE_READONLY (TREE_OPERAND (to, 1)) + /* We can't assert that a MEM won't be set more than once + if the component is not addressable because another + non-addressable component may be referenced by the same MEM. */ + && ! (GET_CODE (to_rtx) == MEM && ! can_address_p (to))) { if (to_rtx == orig_to_rtx) to_rtx = copy_rtx (to_rtx); |