[PATCH] Fix PR 30562, remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)

Andrew Pinski pinskia@gmail.com
Sun Jan 28 18:55:00 GMT 2007


Hi,
  Remove unused variables in tree-ssa-live.c can remove some actually
used variables because the use is hidden in STORED_SYMS and LOADED_SYMS,
both of which were added with the MEM-SSA merge.  So after we remove the
variables that are referenced in STORED_SYMS or LOADED_SYMS, we could
get an ICE.  This patch fixes the problem by marking the variables in
LOADED_SYMS and STORED_SYMS as being used.

OK?  Bootstrapped and tested on i686-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
	* tree-ssa-live.c (mark_all_vars_used): Mark the statement's
	LOADED_SYMS and STORED_SYMS's variables as used.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixpr30562.diff.txt
Type: text/x-patch
Size: 799 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070128/725d502c/attachment.bin>


More information about the Gcc-patches mailing list