This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/60669] New: VRP misses asserts for some already defined statements
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Mar 2014 12:13:37 +0000
- Subject: [Bug tree-optimization/60669] New: VRP misses asserts for some already defined statements
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60669
Bug ID: 60669
Summary: VRP misses asserts for some already defined statements
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Take (derived from gcc.dg/tree-ssa/vrp65.c):
extern void link_error (void);
void
f7 (int s)
{
unsigned t = s;
if ((s & 0x3cc0) == 0x3cc0)
{
if (t <= 0x3cbf)
link_error ();
}
else
{
if (t + 64 <= 63)
link_error ();
}
}
--- CUT ---
Notice how VRP does not insert an assert for t in either side of the if
statement even though it could figure out its range.
This shows up when I was adding a pass which takes common code and hoists them
up.