summaryrefslogtreecommitdiffstats
path: root/test/Analysis/casts.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/casts.c')
-rw-r--r--test/Analysis/casts.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Analysis/casts.c b/test/Analysis/casts.c
index 1c0f357..087bd97 100644
--- a/test/Analysis/casts.c
+++ b/test/Analysis/casts.c
@@ -74,3 +74,14 @@ char ttt(int intSeconds) {
return 0;
return 0;
}
+
+int foo (int* p) {
+ int y = 0;
+ if (p == 0) {
+ if ((*((void**)&p)) == (void*)0) // Test that the cast to void preserves the symbolic region.
+ return 0;
+ else
+ return 5/y; // This code should be unreachable: no-warning.
+ }
+ return 0;
+}
OpenPOWER on IntegriCloud