[Bug tree-optimization/94675] [9/10 regression] -Warray-bounds false positive with -O2
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 21 07:59:13 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94675
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #1)
> unsigned char c, n;
>
> int f (void)
> {
> if (n <= 7) return 0;
>
> unsigned char *p = &c, *q = p + n;
This testcase has UB whenever n > 7 and due to that UB the test actually is
eliminated in evrp.
More information about the Gcc-bugs
mailing list