[Bug rtl-optimization/94189] [9/10 Regression] -fcompare-debug failure on Wstringop-overflow-22.c
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 16 10:22:17 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94189
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
const char a[] = { 'a', 'b', 'c', 'd' };
int
foo (void)
{
return __builtin_strnlen (a, 5);
}
and this one doesn't generate different code between -O2 -g and -O2, but FAILs
with -fcompare-debug because that one does add -w to the second invocation in
order not to emit all the warnings twice, and apparently the code generation in
this case is dependent on whether the warning is emitted or not.
More information about the Gcc-bugs
mailing list