analyzer: add regression tests [PR95152]
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 20 Aug 2020 21:50:14 +0000 (17:50 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 21 Aug 2020 01:15:05 +0000 (21:15 -0400)
commit6b31b6b52612a6d4a7a84e71f6331464d68400d4
tree8f88cff480d85719928d5f8847725ec64c717fec
parent5b9a3d2a0545f0ba118d74aca30b60689d31f387
analyzer: add regression tests [PR95152]

PR analyzer/95152 reports various ICEs in
region_model::get_or_create_mem_ref.

I removed this function as part of the state rewrite in
r11-2694-g808f4dfeb3a95f50f15e71148e5c1067f90a126d.
I've verified that these two test cases reproduce the issue with 10.2
and don't ICE with trunk; adding them as regression tests.

gcc/testsuite/ChangeLog:
PR analyzer/95152
* gcc.dg/analyzer/pr95152-4.c: New test.
* gcc.dg/analyzer/pr95152-5.c: New test.
gcc/testsuite/gcc.dg/analyzer/pr95152-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/analyzer/pr95152-5.c [new file with mode: 0644]