]> git.ipfire.org Git - thirdparty/gcc.git/commit
Strlen pass should set current range query.
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 27 May 2024 17:20:13 +0000 (13:20 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Tue, 28 May 2024 18:51:38 +0000 (14:51 -0400)
commitd52b44aa26aa9976caaaa292f4773a08bbaa2fbb
treed5b6a8e9d997521cf2eced1afee555d988487523
parent5bc731b83b51910dc7f7cacddb4257a16d62ee38
Strlen pass should set current range query.

The strlen pass currently has a local ranger instance, but when it
invokes SCEV, scev will not be able to access to this ranger.

Enable/disable ranger shoud be used, allowing other components to use
the current range_query.

gcc/
* tree-ssa-strlen.cc (strlen_pass::strlen_pass): Add function
pointer and initialize ptr_qry with current range_query.
(strlen_pass::m_ranger): Remove.
(printf_strlen_execute): Enable and disable ranger.
gcc/testsuite/
* gcc.dg/Wstringop-overflow-10.c: Add truncating warning.
gcc/testsuite/gcc.dg/Wstringop-overflow-10.c
gcc/tree-ssa-strlen.cc