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/60669] New: VRP misses asserts for some already defined statements


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.


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