In tree-ssa-reassoc.c the code assumes wrongly, that the 'long' scalar type has pointer size width. This is at least for w64 not true. As reference see insert_operand_rank(), and find_operand_rank.
It just assume that the size of a pointer is at least the sizeof long so this only causes a warning. This fact is true for w64 where long is 32bits while pointers are 64bits.
*** Bug 36386 has been marked as a duplicate of this bug. ***
It true. Just two warnings are shown, but the back-cast of a long to a pointer on w64 in insert_operand_rank() is evil. If the pointer is on heap, it can be easily truncated and point to nowhere.
Look into the code rank is actually a number. So we are taking an integer and storing it into a void* and then we will access it via find_operand_rank which casts the pointer back to an integer type. operand_rank will only contains these integer and never a real pointer and is only modified by insert_operand_rank and only looked into by find_operand_rank. So as mentioned this is not a bug which will cause wrong code. We will never access what is contained in that pointer as it is not really a pointer.
(In reply to comment #4) I see. So just two misleading warnings are there.
Created attachment 18457 [details] Remove cast warnings for target with sizeof (void *)>sizeof(long) If define __INTPTR_TYPE__ is present, this patch uses it to cast from pointer to long, and from long to pointer. Tested for i686-pc-mingw32 and for x86_64-pc-mingw32. Ok, for apply?
Fixed by revision 151515 for 4.5 version. As this bug depends to new config/stdint.m4 and 2.64 support in gcc configure, this won't be backported to 4.4.x