diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2010-11-14 11:24:47 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2010-11-14 11:24:47 +0000 |
commit | ae788515d2b28952fdee5a83b010667dc9285732 (patch) | |
tree | 97e1975467157f9597f21ef3b60596ea692c84ce /gcc/tree-sra.c | |
parent | 8926bd5d5c308154694122957e2a54c965ebee08 (diff) | |
download | gcc-ae788515d2b28952fdee5a83b010667dc9285732.zip gcc-ae788515d2b28952fdee5a83b010667dc9285732.tar.gz gcc-ae788515d2b28952fdee5a83b010667dc9285732.tar.bz2 |
re PR tree-optimization/45722 (FAIL: gcc.c-torture/execute/20040709-2.c execution at -O1 and -Os)
PR tree-optimization/45722
* tree-sra.c (build_ref_for_model): Always build a COMPONENT_REF if
this is a reference to a component.
* ipa-prop.c (ipa_get_member_ptr_load_param): Accept COMPONENT_REF.
(ipa_note_param_call): Adjust comment.
From-SVN: r166731
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index be1b45e..88199f1 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1391,7 +1391,7 @@ build_ref_for_offset (location_t loc, tree base, HOST_WIDE_INT offset, /* Construct a memory reference to a part of an aggregate BASE at the given OFFSET and of the same type as MODEL. In case this is a reference to a - bit-field, the function will replicate the last component_ref of model's + component, the function will replicate the last COMPONENT_REF of model's expr to access it. GSI and INSERT_AFTER have the same meaning as in build_ref_for_offset. */ @@ -1400,12 +1400,9 @@ build_ref_for_model (location_t loc, tree base, HOST_WIDE_INT offset, struct access *model, gimple_stmt_iterator *gsi, bool insert_after) { - if (TREE_CODE (model->expr) == COMPONENT_REF - && DECL_BIT_FIELD (TREE_OPERAND (model->expr, 1))) + if (TREE_CODE (model->expr) == COMPONENT_REF) { - /* This access represents a bit-field. */ tree t, exp_type; - offset -= int_bit_position (TREE_OPERAND (model->expr, 1)); exp_type = TREE_TYPE (TREE_OPERAND (model->expr, 0)); t = build_ref_for_offset (loc, base, offset, exp_type, gsi, insert_after); |