[Bug tree-optimization/20702] [tcb] ASSERT_EXPRs are not inserted when a certain "if" statement is present.

kazu at cs dot umass dot edu gcc-bugzilla@gcc.gnu.org
Fri Apr 1 16:23:00 GMT 2005


------- Additional Comments From kazu at cs dot umass dot edu  2005-04-01 16:23 -------
Let me replace the testcase as follows so that
I can remove dependence on PR 20701.

extern void bar (int);

int
foo (int *p, int b)
{
  int a;

  if (b)
    bar (123);
  else
    bar (321);

  a = *p;
  if (p == 0)
    return 0;

  return a;
}

Note that "p == 0" in the second "if" statement is always false,
but VRP does not fold it.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|20701                       |


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



More information about the Gcc-bugs mailing list