This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, pretty-ipa] Fix wave ICE in SRA
On Wed, May 6, 2009 at 11:53 PM, Eric Botcazou <email@example.com> wrote:
>> It looks like that if the theory is that the extra size can only be padding
>> we can simply ignore this difference - and chose either size that fits
>> our previous analysis more. ?Would that be a solution for the SRA problem?
> I'd be careful, the extra size is not padding for bit-fields, it's in another
> member of the structure. ?And using
So the larger TYPE_SIZE is in fact correct? (Note that for this particular
issue bitfields do not matter)
I think we can arrive at a mismatch situation very easily as outlined in my
mail before. How does RTL expansion handle this in the face of struct
copies? I guess it's simply taking the size of the target.
> ?if (TREE_CODE (exp) == COMPONENT_REF)
> ? ?size_tree = TYPE_SIZE (TREE_TYPE (TREE_OPERAND (exp, 1)));
> ?else if ...and so on...
> is wrong, it's DECL_SIZE (TREE_OPERAND (exp, 1)).
They should be exchangable in the context of an access. At least
... = x.a;
p = &x.a;
... = *p;
already have different sizes and that better should not matter(?).