http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html shows -ftree-dse as an optimization enabled by -O / -O1, but doesn't document it below. via http://tinyurl.com/3cdlnu Per tree-ssa-dce.c: A dead store is a store into a memory location which will later be overwritten by another store without any intervening loads. In this case the earlier store can be deleted.
Confirmed. This was listed on PR 13756.
Subject: Bug number PR 32965 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-09/msg00190.html
Subject: Bug 32965 Author: rask Date: Wed Sep 5 19:47:56 2007 New Revision: 128146 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128146 Log: PR web/32965 PR tree-optimization/13756 * doc/invoke.texi (Options That Control Optimization): Document -ftree-dse. Modified: trunk/gcc/ChangeLog trunk/gcc/doc/invoke.texi
Fixed with revision 128146. The online documentation will be updated automatically within 24 hours.
*** Bug 33798 has been marked as a duplicate of this bug. ***