This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/25382] New: VRP does not get a range from BIT_AND_EXPR if the second operand is constant
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2005 05:20:58 -0000
- Subject: [Bug tree-optimization/25382] New: VRP does not get a range from BIT_AND_EXPR if the second operand is constant
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Take the following example:
void g(int);
int f(int i)
{
int t = i&0xFF;
g(t);
return (i > 0x100);
}
----
This can happen for casts like (int)(char)(i) and to truncate the i.
The range for t should be [0, 0xFF].
--
Summary: VRP does not get a range from BIT_AND_EXPR if the second
operand is constant
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25382