diff options
author | David Malcolm <dmalcolm@redhat.com> | 2020-02-17 03:06:14 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2020-02-17 20:18:03 -0500 |
commit | d8cde6f9c223f1b6d4f4e4e07088f08a629b7c2a (patch) | |
tree | 275bdf0203735282e45a0b56640c5cad3b1bca3a /gcc/tree-ssa.c | |
parent | 1ee98e41383e2c76572c4cbc9a526e9ae63115a2 (diff) | |
download | gcc-d8cde6f9c223f1b6d4f4e4e07088f08a629b7c2a.zip gcc-d8cde6f9c223f1b6d4f4e4e07088f08a629b7c2a.tar.gz gcc-d8cde6f9c223f1b6d4f4e4e07088f08a629b7c2a.tar.bz2 |
analyzer: fix ICE on function pointer casts [PR 93775]
PR analyzer/93775 reports an ICE in cgraph_node::get when -fanalyzer is
used on code that calls a function pointer that was generated via a cast
from a non-function.
This patch fixes it by bulletproofing region_model::get_fndecl_for_call
for the case where the code_region's get_tree_for_child_region returns
NULL.
gcc/analyzer/ChangeLog:
PR analyzer/93775
* region-model.cc (region_model::get_fndecl_for_call): Handle the
case where the code_region's get_tree_for_child_region returns
NULL.
gcc/testsuite/ChangeLog:
PR analyzer/93775
* gcc.dg/analyzer/20020129-1.c: New test.
Diffstat (limited to 'gcc/tree-ssa.c')
0 files changed, 0 insertions, 0 deletions