PING: new pass to warn on questionable uses of alloca() and VLAs

Christophe Lyon
Wed Oct 19 16:22:00 GMT 2016

On 19 October 2016 at 17:55, Jeff Law <> wrote:
> On 10/19/2016 09:32 AM, Aldy Hernandez wrote:
>> On 10/19/2016 09:16 AM, Eric Botcazou wrote:
>>>> m68k-suse-linux
>>> visium-elf too.
>> The attached patch fixes the failures on m68k-suse-linux, visium-elf,
>> and arm-eabi.
>> There were a few problems.
>> One problem is that on lp64 targets (where sizeof(size_t) !=
>> sizeof(int)), the warning is slightly different-- and rightly so.  I
>> have updated the test to handle both warnings on the respective targets.
>> The other problem is that the following snippet is incorrectly warning
>> on 32-bit targets:
>>   if (n > 0 && n < 2000)
>>     p = __builtin_alloca (n);
>> Looking at the gimple it seems like another case of VRP failing to give
>> any range information whatsoever.  I have xfailed it as another case
>> where Andrew's upcoming work should theoretically fix this.  The test is
>> fine on 64-bit targets.
>> Can y'all double check it on your respective targets as I only have a
>> crude cross build?
> OK for the trunk whenever you're ready.
> jeff

You are too fast for me :-)
I do not have the build trees for all the configurations ready for
manual testing...
So, I just merged the initial patch and the 2nd one, and started
a validation job to make sure the 2nd patch fixes all the regressions
observed earlier.
It will take a few hours.


More information about the Gcc-patches mailing list