warning: ‘__builtin_memset’ specified size between 18446744071562067968 and 184467440737095516 15 exceeds maximum object size 9223372036854775807
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-11 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The scotch autopkgtest is failing on ppc64el in kinetic because the compiler is outputting a warning to stderr:
[...]
mpicc -O3 -fPIC -I. -I/usr/
In file included from /usr/include/
In function 'memset',
inlined from 'main' at test_scotch_
/usr/include/
59 | return __builtin_
| ^~~~~~~
60 | __glibc_objsize0 (__dest));
| ~~~~~~~
[...]
Reproducible when invoking gcc directly instead of via the mpicc wrapper; also reproducible with gcc -O2 instead of gcc -O3.
This warning is patently nonsense. The size ranges listed is, in hex, 0xFFFFFFFF80000
So something is wrong with gcc's calculation here, resulting in a spurious warning.
This issue was not reproduced when the autopkgtest ran on ppc64el in Debian. I don't know why, as the compiler should be essentially the same between Debian and Ubuntu - and I've ruled out this being a problem of the -O3 default that exists in Ubuntu packaging but not in Debian.