[Bug tree-optimization/88439] New: missing -Wrestrict on memcpy with a variable offset
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 10 23:55:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88439
Bug ID: 88439
Summary: missing -Wrestrict on memcpy with a variable offset
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: msebor at gcc dot gnu.org
Target Milestone: ---
Thew -Wrestrict warning doesn't trigger for the following overlapping call to
memcpy even though it seems that it could:
$ cat x.c && gcc -O2 -S -Wall x.c
char a[32][32];
void g (int i, int j)
{
if (i == j) // typo, should be: i != j
__builtin_memcpy (a[j], a[i], sizeof a[i]); // missing -Wrestrict
}
More information about the Gcc-bugs
mailing list