[Bug tree-optimization/15452] [tree-ssa] Optimize cascaded a = a == 0;

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Aug 24 04:28:00 GMT 2006



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-08-24 04:27 -------
Another interesting case would be (but which could be handled by VRP):
int
foo (int a)
{
  a = a!=0;
  a = a!=0;
  a = a!=0;
  a = a!=0;
  a = a!=0;
  return a;
}
Which should be optimized to:
int foo(int a) { return a!=0;}


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


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



More information about the Gcc-bugs mailing list