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

            Bug ID: 121418
           Summary: Missed copy prop for aggregate after a memcpy
           Product: gcc
           Version: 14.2.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Like PR 121417 but the memcpy is before the aggregate copy:
```
struct s1
{
  unsigned char t[1024];
};

struct s1 f(struct s1 a)
{
  struct s1 b;
  struct s1 c;
  __builtin_memcpy (&b, &a, sizeof(b));
  c = b;
  return c;
}
```

This does show up in PR 111231  too.

Reply via email to