This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug tree-optimization/32461] [4.3 Regression] Segmentation fault in build_classic_dist_vector_1() at tree-data-ref.c:2700
On 6/24/07, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
Why are the operands of different type at that point?
Because there is a STRIP_NOPS in fold_binary and then we look at
BIT_NOT_EXPR's operand which is a NOP_EXPR. Maybe we should fold
~(int)unsigned_var into (int)~unsigned_var and that would fix the
issue all the time.
As an aside note, I see we might have a type issue with BIT_NOT_EXPR:
else if (TREE_CODE (arg0) == BIT_NOT_EXPR)
return TREE_OPERAND (arg0, 0);
if we have ~(int)~unsigned_int, we will get the incorrect type returned.
Thanks,
Andrew Pinski