------- Comment #21 from jakub at gcc dot gnu dot org  2010-06-25 09:38 -------
True.  Most of the fields of the pointer are still uninitialized (NULLIFY only
clears the data field).
I'm afraid when NULLIFY doesn't clear the whole struct there will be always a
possibility valgrind might complain, the tree optimizers see the comparison as
not having any side-effects, not possibly trapping etc., so some pass might
exchange the two comparisons somewhere.  But worse case it would be just a
valgrind warning, conditional jump based on uninitialized values which in the
end wouldn't have any runtime visible effect.
This patch doesn't try to do anything about that, just improve unswitching such
that it chooses conditions that it can usefully unswitch on (and not unswitch
on always false/true conditions).


-- 


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

Reply via email to