diff options
-rw-r--r-- | gcc/analyzer/engine.cc | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/analyzer/pr97514.c | 18 |
2 files changed, 21 insertions, 2 deletions
diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc index b1c877e..d4c654a 100644 --- a/gcc/analyzer/engine.cc +++ b/gcc/analyzer/engine.cc @@ -1956,8 +1956,9 @@ exploded_graph::add_function_entry (function *fun) return NULL; exploded_node *enode = get_or_create_node (point, state, NULL); - /* We should never fail to add such a node. */ - gcc_assert (enode); + if (!enode) + return NULL; + add_edge (m_origin, enode, NULL); m_functions_with_enodes.add (fun); diff --git a/gcc/testsuite/gcc.dg/analyzer/pr97514.c b/gcc/testsuite/gcc.dg/analyzer/pr97514.c new file mode 100644 index 0000000..27245f4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/pr97514.c @@ -0,0 +1,18 @@ +/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=0 -Wno-analyzer-too-complex" } */ + +typedef void (*sighandler_t) (int); + +void +signal (int, sighandler_t); + +static void +kw (int signum) +{ + (void) signum; +} + +void +gk (int ot) +{ + signal (ot, kw); +} |