This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/20702] [tcb] ASSERT_EXPRs are not inserted when a certain "if" statement is present.
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Apr 2005 16:23:07 -0000
- Subject: [Bug tree-optimization/20702] [tcb] ASSERT_EXPRs are not inserted when a certain "if" statement is present.
- References: <20050331094552.20702.kazu@cs.umass.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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