summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr47881.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr47881.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr47881.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr47881.c b/gcc/testsuite/gcc.dg/pr47881.c
new file mode 100644
index 000000000..ee1707342
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr47881.c
@@ -0,0 +1,24 @@
+/* PR debug/47881 */
+/* { dg-do compile } */
+/* { dg-options "-O -fcompare-debug -fno-dce -funroll-loops -fno-web" } */
+
+extern int data[];
+
+int
+foo (int *t, int *f, int n)
+{
+ int i = 0, a, b, c, d;
+ while (data[*f] && n)
+ n--;
+ for (; i < n; i += 4)
+ {
+ a = data[*(f++) & 0x7f];
+ c = data[*(f++) & 0x7f];
+ c = data[*(f++) & 0x7f];
+ d = data[*(f++) & 0x7f];
+ if ((a & 0x80) || (b & 0x80) || (c & 0x80) || (d & 0x80))
+ return 1;
+ *(t++) = 16;
+ }
+ return 0;
+}