https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93508

            Bug ID: 93508
           Summary: VN doesn't handle _chk functions or valueize their
                    length
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

unsigned int foo(unsigned int x, int *p)
{
  unsigned int src = x;
  unsigned int dst;
  *p = sizeof (unsigned int);
  __builtin___memcpy_chk (&dst, &src, *p, 16);
  return dst;
}

should be optimized to return x in fre1.

Reply via email to