[cfe-commits] [PATCH] struct{bool} -> int function argument coercion emits an invalid store on ARM

Evgeniy Stepanov eugeni.stepanov at gmail.com
Fri Feb 3 04:05:12 PST 2012


Hi,

this is a fix for PR11905.

The current behaviour when generation a function prolog for arguments
of coerced types is to allocate a stack temp of the real argument type
and store the argument(s) there. This is wrong, because storage size
of the coerce-to type can be larger than that of the real type.

The new behaviour is to allocate a temp of the coerced type, copy it,
and then reference through a bitcasted pointer of the real type.

Please review.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arg-coercion.patch
Type: text/x-patch
Size: 2034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120203/254a3e51/attachment.bin>


More information about the cfe-commits mailing list