Fix uninitialized error with BUILD_CONFIG=bootstrap-O1

Alexandre Oliva aoliva@redhat.com
Fri Jun 11 20:23:00 GMT 2010


On Jun 11, 2010, Eric Botcazou <ebotcazou@adacore.com> wrote:

>> I suppose -O2 infers that new_ptr can't be NULL because it's
>> dereferenced before, so last will always be set before we exit the loop,
>> but at -O1 it doesn't.
>> 
>> This patch avoids the warning, but perhaps the loop should be turned
>> into a do/while loop to avoid the unnecessary test.

> The most correct version is 'last = NULL_TREE' but then the line overflows.
> So I'd initialize 'last' to NULL_TREE in its declaration; OK with this change.

Thanks, I'm checking this in.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ada-update-pointer-to-uninit.patch
Type: text/x-diff
Size: 756 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100611/db197781/attachment.bin>
-------------- next part --------------


-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


More information about the Gcc-patches mailing list