summaryrefslogtreecommitdiff
path: root/libmudflap/testsuite/libmudflap.c/pass34-frag.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmudflap/testsuite/libmudflap.c/pass34-frag.c')
-rw-r--r--libmudflap/testsuite/libmudflap.c/pass34-frag.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libmudflap/testsuite/libmudflap.c/pass34-frag.c b/libmudflap/testsuite/libmudflap.c/pass34-frag.c
new file mode 100644
index 000000000..2dfd0ca21
--- /dev/null
+++ b/libmudflap/testsuite/libmudflap.c/pass34-frag.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+void test (int *k)
+{
+ if (*k > 5) { *k --; }
+}
+
+int z;
+
+int main ()
+{
+/* z is initialized, but not via a pointer, so not instrumented */
+z = rand ();
+test (& z);
+return 0;
+}