summaryrefslogtreecommitdiff
path: root/gcc/analyzer/region-model-reachability.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/analyzer/region-model-reachability.cc')
-rw-r--r--gcc/analyzer/region-model-reachability.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/analyzer/region-model-reachability.cc b/gcc/analyzer/region-model-reachability.cc
index b876b8f0363..12d09c3e500 100644
--- a/gcc/analyzer/region-model-reachability.cc
+++ b/gcc/analyzer/region-model-reachability.cc
@@ -252,12 +252,8 @@ reachable_regions::handle_parm (const svalue *sval, tree param_type)
m_mutable_svals.add (sval);
else
m_reachable_svals.add (sval);
- if (const region_svalue *parm_ptr
- = sval->dyn_cast_region_svalue ())
- {
- const region *pointee_reg = parm_ptr->get_pointee ();
- add (pointee_reg, is_mutable);
- }
+ if (const region *base_reg = sval->maybe_get_deref_base_region ())
+ add (base_reg, is_mutable);
/* Treat all svalues within a compound_svalue as reachable. */
if (const compound_svalue *compound_sval
= sval->dyn_cast_compound_svalue ())