This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/25382] New: VRP does not get a range from BIT_AND_EXPR if the second operand is constant


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]