[2/7,analyzer] More test coverage

Message ID 20191204162530.9285-3-dmalcolm@redhat.com
State New
Headers show
Series
  • Add checking for unsafe calls within signal handlers
Related show

Commit Message

David Malcolm Dec. 4, 2019, 4:25 p.m.
gcc/testsuite/ChangeLog:
	* gcc.dg/analyzer/data-model-1.c: Include <stdio.h>.
	(test_53): New function.
---
 gcc/testsuite/gcc.dg/analyzer/data-model-1.c | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
2.21.0

Patch

diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-1.c b/gcc/testsuite/gcc.dg/analyzer/data-model-1.c
index c195b74edc72..43d08474283e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-1.c
@@ -1,5 +1,6 @@ 
 #include <stdlib.h>
 #include <string.h>
+#include <stdio.h>
 
 struct foo
 {
@@ -1076,3 +1077,8 @@  void test_52 (struct big b)
   __analyzer_eval (b.ia[0] == d.ia[0]); /* { dg-warning "TRUE" "" { xfail *-*-* } } */
   /* { dg-warning "UNKNOWN" "" { target *-*-* } .-1 } */
 }
+
+void test_53 (const char *msg)
+{
+  (void)fprintf(stderr, "LOG: %s", msg);
+}