aboutsummaryrefslogtreecommitdiffstats
path: root/test/mem/memswap_same.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/mem/memswap_same.c')
-rw-r--r--test/mem/memswap_same.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/mem/memswap_same.c b/test/mem/memswap_same.c
new file mode 100644
index 0000000..532f8c9
--- /dev/null
+++ b/test/mem/memswap_same.c
@@ -0,0 +1,9 @@
+#include <mem.h>
+
+static int const a = 1;
+
+int main(void){
+ int x = a;
+ calt_memswap(&x, &x, sizeof x);
+ return x == a ? 0 : 1;
+}