public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] analyzer: fix SARD-tc841-basic-00182-min.c test case [PR108507]
@ 2023-01-26 14:20 David Malcolm
  0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2023-01-26 14:20 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

Lightly tested on Compiler Explorer; fixes issues on
aarch64-unknown-linux-gnu.
Successfully regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-5389-gf1eab269288ffa.

gcc/testsuite/ChangeLog:
	PR analyzer/108507
	* gcc.dg/analyzer/SARD-tc841-basic-00182-min.c: Add
	-Wno-stringop-overflow.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 gcc/testsuite/gcc.dg/analyzer/SARD-tc841-basic-00182-min.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/analyzer/SARD-tc841-basic-00182-min.c b/gcc/testsuite/gcc.dg/analyzer/SARD-tc841-basic-00182-min.c
index 577dce13f00..ed9ad317d19 100644
--- a/gcc/testsuite/gcc.dg/analyzer/SARD-tc841-basic-00182-min.c
+++ b/gcc/testsuite/gcc.dg/analyzer/SARD-tc841-basic-00182-min.c
@@ -4,6 +4,9 @@
      Black, P. , Koo, H. and Irish, T. (2013), A Basic CWE-121 Buffer Overflow Effectiveness Test Suite, Proc. 6th Latin-American Symposium on Dependable Computing, Rio de Janeiro, -1, [online], https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=913117 (Accessed January 17, 2023)
 */
 
+/* The purpose of this testcase is to see if -fanalyzer can detect the bug.  */
+/* { dg-additional-options "-Wno-stringop-overflow" } */
+
 /* Taxonomy Classification: 0000300602130000031110 */
 
 /*
-- 
2.26.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-26 14:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-26 14:20 [committed] analyzer: fix SARD-tc841-basic-00182-min.c test case [PR108507] David Malcolm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).