[Bug analyzer/105264] -Wanalyzer-use-of-uninitialized-value gets confused about var + i v.s. [i]

2022-04-15 Thread avarab at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105264 --- Comment #9 from Ævar Arnfjörð Bjarmason --- Thanks a lot, I can confirm that this fixes the issue in builtin/merge-file.c in git.git.

[Bug analyzer/105264] -Wanalyzer-use-of-uninitialized-value gets confused about var + i v.s. [i]

2022-04-14 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105264 --- Comment #8 from David Malcolm --- The above patch hopefully fixes the false positive you're seeing, but as noted, there are some deeper issues that it doesn't fix; keeping this bug open.

[Bug analyzer/105264] -Wanalyzer-use-of-uninitialized-value gets confused about var + i v.s. [i]

2022-04-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105264 --- Comment #7 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:a358e4b60815b41e27f3508014ceb592f86b9b45 commit r12-8169-ga358e4b60815b41e27f3508014ceb592f86b9b45 Author: David Malcolm Date:

[Bug analyzer/105264] -Wanalyzer-use-of-uninitialized-value gets confused about var + i v.s. [i]

2022-04-14 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105264 --- Comment #6 from David Malcolm --- There are some fiddly issues where the analyzer fails to figure out that ptr + i and [i] refer to the same memory, for certain symbolic values of i. I'm testing a partial fix for GCC 12, which at least

[Bug analyzer/105264] -Wanalyzer-use-of-uninitialized-value gets confused about var + i v.s. [i]

2022-04-14 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105264 David Malcolm changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug analyzer/105264] -Wanalyzer-use-of-uninitialized-value gets confused about var + i v.s. [i]

2022-04-14 Thread avarab at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105264 --- Comment #4 from Ævar Arnfjörð Bjarmason --- Created attachment 52806 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52806=edit testcase-full.c (gcc -E of testcase.c) The gcc -E version of testcase.c, probably useless since it only

[Bug analyzer/105264] -Wanalyzer-use-of-uninitialized-value gets confused about var + i v.s. [i]

2022-04-14 Thread avarab at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105264 Ævar Arnfjörð Bjarmason changed: What|Removed |Added CC||avarab at gmail dot com ---

[Bug analyzer/105264] -Wanalyzer-use-of-uninitialized-value gets confused about var + i v.s. [i]

2022-04-14 Thread avarab at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105264 --- Comment #2 from Ævar Arnfjörð Bjarmason --- I think I can do one better. Here's a stand-alone reproducible test case without any headers except standard headers, I've expanded the gcc -E version of that too, but presumably you won't need

[Bug analyzer/105264] -Wanalyzer-use-of-uninitialized-value gets confused about var + i v.s. [i]

2022-04-13 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105264 --- Comment #1 from David Malcolm --- Thanks for filing this bug. I suspect the analyzer is getting confused about the loop index on successive iterations (and state relating to this). Please can you: (a) specify exactly which compilation