> Yes, either way I suppose.  The following also looks dangerous to me:
>         /* If OFFSET is making OP0 more aligned than BIGGEST_ALIGNMENT,
>            record its alignment as BIGGEST_ALIGNMENT.  */
>         if (MEM_P (op0) && bitpos == 0 && offset != 0
>             && is_aligning_offset (offset, tem))
>           set_mem_align (op0, BIGGEST_ALIGNMENT);
> Maybe we can fall through most of the rest of the function if we
> canonicalized in the above way?  Eric?

Probably not, I'm afraid.  I agree that the above call to set_mem_align is 
potentially problematic if we previously allocated the temp.  Moreover, I 
think that the other temp allocation around line 9840 is problematic too.

On the other hand, we could avoid skipping set_mem_attributes entirely by 
passing the type instead of the expression.

So I'd set a flag for the first temp allocation, skip the set_mem_align call if 
it is set and pass the type instead of the expression in the final call to 
set_mem_attributes if it is set.  And I'd handle the second temp allocation 
independently and pass the type here too.

Eric Botcazou

Reply via email to