aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-08-10 09:18:18 +0200
committerMartin Liska <mliska@suse.cz>2022-08-10 09:18:18 +0200
commitb629a7958faf817ef658e3ce59183bfb9ccefe96 (patch)
tree4515688b7c5645bbc5d28b8a711bc7f8f9e9b119 /gcc/analyzer
parent9fce2fbb1dff9f090d98a056df1da459ba45f16f (diff)
parentc16d9f78dc81664e3341157c5a6efb85c0c141f4 (diff)
downloadgcc-b629a7958faf817ef658e3ce59183bfb9ccefe96.zip
gcc-b629a7958faf817ef658e3ce59183bfb9ccefe96.tar.gz
gcc-b629a7958faf817ef658e3ce59183bfb9ccefe96.tar.bz2
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/analyzer')
-rw-r--r--gcc/analyzer/ChangeLog6
-rw-r--r--gcc/analyzer/region-model.cc8
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog
index 0b93219..b16971b 100644
--- a/gcc/analyzer/ChangeLog
+++ b/gcc/analyzer/ChangeLog
@@ -1,3 +1,9 @@
+2022-08-09 David Malcolm <dmalcolm@redhat.com>
+
+ PR analyzer/106573
+ * region-model.cc (region_model::on_call_pre): Ensure that we call
+ get_arg_svalue on all arguments.
+
2022-08-05 David Malcolm <dmalcolm@redhat.com>
PR analyzer/105947
diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc
index a140f4d..8393c7d 100644
--- a/gcc/analyzer/region-model.cc
+++ b/gcc/analyzer/region-model.cc
@@ -1355,6 +1355,14 @@ region_model::on_call_pre (const gcall *call, region_model_context *ctxt,
&& gimple_call_internal_fn (call) == IFN_DEFERRED_INIT)
return false;
+ /* Get svalues for all of the arguments at the callsite, to ensure that we
+ complain about any uninitialized arguments. This might lead to
+ duplicates if any of the handling below also looks up the svalues,
+ but the deduplication code should deal with that. */
+ if (ctxt)
+ for (unsigned arg_idx = 0; arg_idx < cd.num_args (); arg_idx++)
+ cd.get_arg_svalue (arg_idx);
+
/* Some of the cases below update the lhs of the call based on the
return value, but not all. Provide a default value, which may
get overwritten below. */