[Bug tree-optimization/121418] New: Missed copy prop for aggregate after a memcpy
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 5 17:29:02 GMT 2025
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.
More information about the Gcc-bugs
mailing list