diff options
-rw-r--r-- | tools/ccc/test/ccc/analyze.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/ccc/test/ccc/analyze.c b/tools/ccc/test/ccc/analyze.c new file mode 100644 index 0000000000..b03c6af9c1 --- /dev/null +++ b/tools/ccc/test/ccc/analyze.c @@ -0,0 +1,7 @@ +// RUN: xcc --analyze %s -o %t && +// RUN: grep '<string>Dereference of null pointer.</string>' %t + +void f(int *p) { + if (!p) + *p = 0; +} |