https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93212
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
This fixes it, though to do this "properly" would also need DejaGnu
infrastructure for adding C++ testcases.
diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc
index 7a863e020e23..1366987512e5 100644
--- a/gcc/analyzer/region-model.cc
+++ b/gcc/analyzer/region-model.cc
@@ -5997,7 +5997,7 @@ make_region_for_type (region_id parent_rid, tree type)
if (TREE_CODE (type) == UNION_TYPE)
return new union_region (parent_rid, type);
- if (TREE_CODE (type) == FUNCTION_TYPE)
+ if (FUNC_OR_METHOD_TYPE_P (type))
return new function_region (parent_rid, type);
/* If we have a void *, make a new symbolic region. */
diff --git a/gcc/analyzer/region-model.h b/gcc/analyzer/region-model.h
index cdce812d7d22..1e4e9c5a47c9 100644
--- a/gcc/analyzer/region-model.h
+++ b/gcc/analyzer/region-model.h
@@ -1233,7 +1233,7 @@ public:
function_region (region_id parent_rid, tree type)
: map_region (parent_rid, type)
{
- gcc_assert (TREE_CODE (type) == FUNCTION_TYPE);
+ gcc_assert (FUNC_OR_METHOD_TYPE_P (type));
}
function_region (const function_region &other)
: map_region (other)