PR53818 - Allow -finit-local-zero with -fno-automatic for result variables

Tobias Burnus burnus@net-b.de
Mon Jul 2 07:10:00 GMT 2012


For some reasons, result variables are walked twice. With 
-finit-local-zero their value gets set to 0, either via an inserted 
assignment or by adding a initialization (sym->value).

With -fno-automatic sym->value is also set for result variables, which 
later leads to an error. With the patch, that code path is skipped and 
an assignment is done. (As the code path is taken twice, twp assignments 
are done. I couldn't quickly see why the result variable is resolved twice.)

Build and regtested on x86-64-linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init-result.diff
Type: text/x-patch
Size: 1340 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120702/59df4f40/attachment.bin>


More information about the Gcc-patches mailing list