summaryrefslogtreecommitdiff
path: root/libmudflap/testsuite/libmudflap.c/fail23-frag.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmudflap/testsuite/libmudflap.c/fail23-frag.c')
-rw-r--r--libmudflap/testsuite/libmudflap.c/fail23-frag.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libmudflap/testsuite/libmudflap.c/fail23-frag.c b/libmudflap/testsuite/libmudflap.c/fail23-frag.c
new file mode 100644
index 000000000..bb1b52ec7
--- /dev/null
+++ b/libmudflap/testsuite/libmudflap.c/fail23-frag.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+char zoo [10];
+
+int main ()
+{
+int i = strlen ("012345") + strlen ("6789") + strlen ("01"); /* 11 */
+zoo[i] = 'a';
+return 0;
+}
+/* { dg-output "mudflap violation 1.*" } */
+/* { dg-output "Nearby object.*" } */
+/* { dg-output "mudflap object.*zoo.*static.*" } */
+/* { dg-do run { xfail *-*-* } } */