This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 10/25/2011 10:20 AM, Andrew MacLeod wrote:OK, how's this. (just the c-common.c file)+ /* Otherwise there is a lockfree match, transform the call from: + void fn(T* mem, T* desired, T* return, model) + into + *((In *)return = fn (T* mem, *((In *)desired, model) */This is, in general, an aliasing violation nearly guaranteed to fail. Instead try
*return = VCE<In>(fn(mem, VCE<In>(*desired), model))
where VCE<T>(E) is a VIEW_CONVERT_EXPR with TREE_TYPE = T and a first operand expression of E.
But in particular, the actual stores and loads happen in the original type.
Attachment:
K
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |