analyzer: add regression test for leak false positive
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 14 Sep 2020 13:05:50 +0000 (09:05 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 14 Sep 2020 16:27:28 +0000 (12:27 -0400)
commit00adddd65689d995d8bdf306d0850c852ff0fd25
tree5921bf76340a84babe81872b97c438c614122ba1
parent35e3f0829d8e9cdc7ea19917c9f3a7add3f14847
analyzer: add regression test for leak false positive

Downstream bug report:
  https://bugzilla.redhat.com/show_bug.cgi?id=1878600
describes a false positive from -Wanalyzer-file-leak seen with
gcc 10.2, but which has been fixed in gcc 11.

This patch adds the reproducer as a regression test.

gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/rhbz1878600.c: New test.
gcc/testsuite/gcc.dg/analyzer/rhbz1878600.c [new file with mode: 0644]