gcc/analyzer/ChangeLog:
PR analyzer/106374
* region.cc (decl_region::get_svalue_for_initializer): Bail out on
untracked regions.
gcc/testsuite/ChangeLog:
PR analyzer/106374
* gcc.dg/analyzer/untracked-2.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
if (binding->symbolic_p ())
return NULL;
+ /* If we don't care about tracking the content of this region, then
+ it's unused, and the value doesn't matter. */
+ if (!tracked_p ())
+ return NULL;
+
binding_cluster c (this);
c.zero_fill_region (mgr->get_store_manager (), this);
return mgr->get_or_create_compound_svalue (TREE_TYPE (m_decl),
--- /dev/null
+typedef unsigned char u8;
+extern int foo(const u8 *key, unsigned int keylen);
+int test (void)
+{
+ static const u8 default_salt[64];
+ return foo(default_salt, 64);
+}