aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/backend
diff options
Diffstat (limited to 'validation/backend')
-rw-r--r--validation/backend/store-x2.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/validation/backend/store-x2.c b/validation/backend/store-x2.c
new file mode 100644
index 00000000..5ccc9b43
--- /dev/null
+++ b/validation/backend/store-x2.c
@@ -0,0 +1,16 @@
+void foo(int *p, int a, int b);
+void foo(int *p, int a, int b)
+{
+ int c = a + b;
+
+ p[0] = c;
+ p[1] = c;
+}
+
+/*
+ * check-name: store-x2
+ * check-command: sparsec -c $file -o tmp.o
+ * check-description: Verify in output_op_store() that
+ * the first store doesn't mess anymore with the
+ * 'target' and thus making the second store unusable.
+ */