]> git.ipfire.org Git - thirdparty/gcc.git/commit
testsuite: add test coverage for PR analyzer/108045
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 13 Mar 2023 18:53:04 +0000 (14:53 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 13 Mar 2023 18:53:04 +0000 (14:53 -0400)
commit129664c67b774511b53bfeee9e80a142ae7cd026
treec023e181f0bed543f42b385a6db474644e90c034
parentfa9d3aa67894c8cadf9840be424b566a8c53c8e4
testsuite: add test coverage for PR analyzer/108045

PR analyzer/108045 reports a leak false positive from -fanalyzer.

The false +ve as reported seems to have been fixed by
r13-6589-g14f5e56a8a766c, but with -fanalyzer-call-summaries there are
two additional false +ves which aren't fixed by that commit.

This patch adds test coverage for these cases.

gcc/testsuite/ChangeLog:
PR analyzer/108045
* gcc.dg/analyzer/leak-pr108045-with-call-summaries.c: New test.
* gcc.dg/analyzer/leak-pr108045-without-call-summaries.c: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/testsuite/gcc.dg/analyzer/leak-pr108045-with-call-summaries.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/analyzer/leak-pr108045-without-call-summaries.c [new file with mode: 0644]