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