analyzer: fix -Wanalyzer-allocation-size false -ve on alloca [PR108616]
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 1 Feb 2023 02:18:10 +0000 (21:18 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 1 Feb 2023 02:18:10 +0000 (21:18 -0500)
commit70d34f2a30a5f1a2a09f547d92243db32d79f3f7
tree8963cc2692e3d78872360e3628569e5d2bf99e1c
parenta90316c6ceddfbb47b3c2161baf446ccb87df5ff
analyzer: fix -Wanalyzer-allocation-size false -ve on alloca [PR108616]

gcc/analyzer/ChangeLog:
PR analyzer/108616
* pending-diagnostic.cc (fixup_location_in_macro_p): Add "alloca"
to macros that we shouldn't unwind inside.

gcc/testsuite/ChangeLog:
PR analyzer/108616
* gcc.dg/analyzer/allocation-size-multiline-3.c: New test.
* gcc.dg/analyzer/test-alloca.h: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/pending-diagnostic.cc
gcc/testsuite/gcc.dg/analyzer/allocation-size-multiline-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/analyzer/test-alloca.h [new file with mode: 0644]