analyzer: add testcases for PR 93355 (intl/localealias.c leak)
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 19 Dec 2019 21:15:09 +0000 (16:15 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Thu, 24 Sep 2020 01:25:51 +0000 (21:25 -0400)
commit6b828f69519a50e6e2961b62ea552bf89d287199
tree872976c733f31ad9c2e9790ddf21a5eeb9ae3fa3
parent84fb35466654ec179fa16e718a5014fbe9f41357
analyzer: add testcases for PR 93355 (intl/localealias.c leak)

PR analyzer/93355 reports a missing diagnostic about a FILE leak in
intl/localealias.c.  This appears to be due to a issue in the
feasibility-checking code, though there is also a state explosion.

This patch adds test cases that I've been using when investigating this,
two of them currently requiring -fno-analyzer-feasibility, and one
currently requiring -Wno-analyzer-too-complex.

gcc/testsuite/ChangeLog:
PR analyzer/93355
* gcc.dg/analyzer/pr93355-localealias-feasibility.c: New test.
* gcc.dg/analyzer/pr93355-localealias-simplified.c: New test.
* gcc.dg/analyzer/pr93355-localealias.c: New test.
gcc/testsuite/gcc.dg/analyzer/pr93355-localealias-feasibility.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/analyzer/pr93355-localealias-simplified.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/analyzer/pr93355-localealias.c [new file with mode: 0644]