>> +      else if (SYMBOL_REF_HAS_BLOCK_INFO_P (sym)
>>
>> This test makes sense.
>>
>> +       && SYMBOL_REF_ANCHOR_P (sym)
>>
>> Do we  need this test  or is the patch being conservative?  I would
>> have thought that it is sufficient to drop this test and just take the
>> block alignment...
>>
> Thanks for the review.
>
> If I understand gcc/rtl.h correctly, SYMBOL_REF_ANCHOR_P (sym) is
> required for anchor SYMBOL_REFS. SYMBOL_REF_BLOCK (sym) != NULL is
> probably redundant. This can probably become an gcc_assert
> (SYMBOL_REF_BLOCK (sym)) instead.

I agree with your interpretation of the code and comments in rtl.h.  I
also accept that SYMBOL_REF_ANCHOR_P() is sufficient to resolve the
test case.  However I'm wondering why we need to constraint the test
down to SYMBOL_REF_ANCHOR_P().  At this point in the code we are
trying to find alignment of the object, if we have a SYMBOL_REF_BLOCK
then we can get the block alignment irrespective of
SYMBOL_REF_ANCHOR_P().

Cheers
/Marcus

Reply via email to