analyzer: fix ICE on setjmp with non-pointer-type [PR97029]
authorDavid Malcolm <dmalcolm@redhat.com>
Sat, 12 Sep 2020 13:28:05 +0000 (09:28 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 14 Sep 2020 16:26:24 +0000 (12:26 -0400)
commit35e3f0829d8e9cdc7ea19917c9f3a7add3f14847
treeec301c5842cac19f59dcc340c4f431702a21c395
parenta7d8dcdf2f3cf9a801e655f2eec3967a3a3ba666
analyzer: fix ICE on setjmp with non-pointer-type [PR97029]

gcc/analyzer/ChangeLog:
PR analyzer/97029
* analyzer.cc (is_setjmp_call_p): Require the initial arg to be a
pointer.
* region-model.cc (region_model::deref_rvalue): Assert that the
svalue is of pointer type.

gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/pr97029.c: New test.
gcc/analyzer/analyzer.cc
gcc/analyzer/region-model.cc
gcc/testsuite/gcc.dg/analyzer/pr97029.c [new file with mode: 0644]