[Bug tree-optimization/123374] [16 regression] elfutils: bogus warning when building debuginfod.cxx since r16-5258
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 7 01:40:49 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123374
--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Siddhesh Poyarekar
<siddhesh@gcc.gnu.org>:
https://gcc.gnu.org/g:6345c1c11c2024d707ab1f8eb556a1eddd65dba0
commit r16-6531-g6345c1c11c2024d707ab1f8eb556a1eddd65dba0
Author: Siddhesh Poyarekar <siddhesh@gotplt.org>
Date: Tue Jan 6 10:21:50 2026 -0500
warn_access: Limit waccess2 to dangling pointer checks [PR 123374]
The second pass of warn_access (waccess2) was added to implement
dangling pointer checks but it implicitly ran the early checks too,
which issues false warnings on code that has not been fully optimized.
Limit this second run to only dangling pointer checks for call
statements. This does not break any of the existing warning tests, so
it didn't seem to add any actual value for the additional run anyway.
gcc/ChangeLog:
PR tree-optimization/123374
* gimple-ssa-warn-access.cc (pass_waccess::set_pass_param): Add
a second parameter.
(pass_waccess::check_call): Skip access checks for waccess2.
(pass_waccess::execute): Drop initialization of
M_CHECK_DANGLING_P.
* passes.def: Adjust.
gcc/testsuite/ChangeLog:
PR tree-optimization/123374
* g++.dg/warn/pr123374.C: New test.
Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
More information about the Gcc-bugs
mailing list