diff options
author | Richard Henderson <rth@redhat.com> | 2004-08-30 14:39:42 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-08-30 14:39:42 -0700 |
commit | bc482be4939cf93e6ddb948a42c751824e0a2d3e (patch) | |
tree | 8fba8975eb49eb9a3a44b03ca04682c55bad8378 /gcc/tree.c | |
parent | 625be2863598fcaa489d1372ee825aff85ea7cec (diff) | |
download | gcc-bc482be4939cf93e6ddb948a42c751824e0a2d3e.zip gcc-bc482be4939cf93e6ddb948a42c751824e0a2d3e.tar.gz gcc-bc482be4939cf93e6ddb948a42c751824e0a2d3e.tar.bz2 |
expr.c (array_ref_element_size): Force aligned_size back to sizetype.
* expr.c (array_ref_element_size): Force aligned_size back to
sizetype.
(component_ref_field_offset): Similarly for aligned_offset.
* tree.c (recompute_tree_invarant_for_addr_expr): Mark raw
low-bound, element-size, field-offset fields rather than
computed values.
From-SVN: r86803
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -2252,15 +2252,20 @@ do { tree _node = (NODE); \ && TREE_CODE (TREE_TYPE (TREE_OPERAND (node, 0))) == ARRAY_TYPE) { UPDATE_TITCSE (TREE_OPERAND (node, 1)); - UPDATE_TITCSE (array_ref_low_bound (node)); - UPDATE_TITCSE (array_ref_element_size (node)); + if (TREE_OPERAND (node, 2)) + UPDATE_TITCSE (TREE_OPERAND (node, 2)); + if (TREE_OPERAND (node, 3)) + UPDATE_TITCSE (TREE_OPERAND (node, 3)); } /* Likewise, just because this is a COMPONENT_REF doesn't mean we have a FIELD_DECL, apparently. The G++ front end can put something else there, at least temporarily. */ else if (TREE_CODE (node) == COMPONENT_REF && TREE_CODE (TREE_OPERAND (node, 1)) == FIELD_DECL) - UPDATE_TITCSE (component_ref_field_offset (node)); + { + if (TREE_OPERAND (node, 2)) + UPDATE_TITCSE (TREE_OPERAND (node, 2)); + } else if (TREE_CODE (node) == BIT_FIELD_REF) UPDATE_TITCSE (TREE_OPERAND (node, 2)); } |