aboutsummaryrefslogtreecommitdiff
path: root/gcc/cil/tests/getbitsy.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cil/tests/getbitsy.c')
-rw-r--r--gcc/cil/tests/getbitsy.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/cil/tests/getbitsy.c b/gcc/cil/tests/getbitsy.c
new file mode 100644
index 00000000000..87565096d79
--- /dev/null
+++ b/gcc/cil/tests/getbitsy.c
@@ -0,0 +1,31 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+struct layer_data
+{
+ unsigned char Rdbfr[2048];
+ unsigned char *Rdptr;
+};
+static struct layer_data ldd;
+static struct layer_data *ld;
+
+int
+Flush_Buffer (void)
+{
+ if (ld->Rdptr < ld->Rdbfr + 2044)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+int
+main (int argc, char *arv[])
+{
+ ld = &ldd;
+ ld->Rdptr = ld->Rdbfr + 2048;
+ return Flush_Buffer ();
+}