summaryrefslogtreecommitdiff
path: root/t/helper/test-print-larger-than-ssize.c
diff options
context:
space:
mode:
Diffstat (limited to 't/helper/test-print-larger-than-ssize.c')
-rw-r--r--t/helper/test-print-larger-than-ssize.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/helper/test-print-larger-than-ssize.c b/t/helper/test-print-larger-than-ssize.c
new file mode 100644
index 0000000000..b9852c493d
--- /dev/null
+++ b/t/helper/test-print-larger-than-ssize.c
@@ -0,0 +1,10 @@
+#include "cache.h"
+
+int cmd_main(int argc, const char **argv)
+{
+ size_t large = ~0;
+
+ large = ~(large & ~(large >> 1)) + 1;
+ printf("%" PRIuMAX "\n", (uintmax_t) large);
+ return 0;
+}