This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: Make valgrind happy with tree-ssa-structalias.c



On Sep 21, 2005, at 11:09 AM, Daniel Berlin wrote:


In get_constraint_for_component_ref, it is apparently possible for
bitsize to not be set by get_inner_reference, even though that would
have to be a bug, since it would imply either that DECL_SIZE of a
FIELD_DECL is NULL, or the first operand of a BIT_FIELD_REF was NULL.

In fact, adding the following assert to get_inner_reference before the
check for size_tree != 0, finds the real bug here:

gcc_assert (size_tree != 0 || (TREE_CODE (exp) != COMPONENT_REF  &&
TREE_CODE (exp) != BIT_FIELD_REF));

we get a component_ref with:

 arg 1 <field_decl 0x403462e0 augmentation type <array_type 0x40346284>
        BLK file ../../gcc/unwind-dw2-fde.h line 145
        align 8 offset_align 128
        offset <integer_cst 0x401691b0 constant invariant 0>
        bit offset <integer_cst 0x403450f0 constant invariant 72>
context <record_type 0x403460b8 dwarf_cie>>>

DECL_SIZE on this field_decl is NULL. I was always under the impression
that DECL_SIZE should always be set, even if it was to a non-constant
value.

DECL_SIZE is null when the type is not a complete type.


--- Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]