This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33302] dead-store not eliminated
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Sep 2007 11:48:04 -0000
- Subject: [Bug tree-optimization/33302] dead-store not eliminated
- References: <bug-33302-8535@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2007-09-05 11:48 -------
DSE does a post-dominator walk starting from the exit block. But the exit
block
has no predecessors because the function does never exit ;)
void foo(int *p)
{
while (1)
{
*p = 0;
*p = 0;
}
}
after DSE:
foo (p)
{
<bb 2>:
<bb 3>:
*p_1(D) = 0;
*p_1(D) = 0;
goto <bb 3>;
}
I suppose more post-dom walk optimizations are affected by this "bug".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33302