[Bug rtl-optimization/56434] document that __attribute__((__malloc__)) assumes returned pointer has BIGGEST_ALIGNMENT

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Fri Mar 22 09:57:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56434

--- Comment #8 from rguenther at suse dot de <rguenther at suse dot de> 2013-03-22 09:56:37 UTC ---
On Thu, 21 Mar 2013, chip at pobox dot com wrote:

> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56434
> 
> --- Comment #7 from Chip Salzenberg <chip at pobox dot com> 2013-03-21 00:31:40 UTC ---
> So ... is there still a question of the Right Thing here?  It seems that fixing
> MALLOC_ABI_ALIGNMENT for the world, and ensuring that BIGGEST_ALIGNMENT never
> affects the ABI, are the actions to take.  If this were done soon we could even
> see it fixed for 4.8.0.  Help?

The RTL code using BIGGEST_ALIGNMENT for the malloc result is simply
wrong and was wrong since forever.  What the replacement should be
is the question here, but as we use MALLOC_ABI_ALIGNMENT on the
tree level for _exactly the same purpose_ I think the answer is
obvious.

I will propose a patch.

Richard.



More information about the Gcc-bugs mailing list