summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/20020729-1.c
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.target/i386/20020729-1.c
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/20020729-1.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/20020729-1.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/20020729-1.c b/gcc/testsuite/gcc.target/i386/20020729-1.c
new file mode 100644
index 000000000..d4ef9bfcd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/20020729-1.c
@@ -0,0 +1,52 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2 -march=k6" } */
+
+static inline void *
+baz (void *s, unsigned long c, unsigned int count)
+{
+ int d0, d1;
+ __asm__ __volatile__ (""
+ : "=&c" (d0), "=&D" (d1)
+ :"a" (c), "q" (count), "0" (count / 4), "1" ((long) s)
+ :"memory");
+ return s;
+}
+
+struct A
+{
+ unsigned long *a;
+};
+
+inline static void *
+bar (struct A *x, int y)
+{
+ char *ptr;
+
+ ptr = (void *) x->a[y >> 12];
+ ptr += y % (1UL << 12);
+ return (void *) ptr;
+}
+
+int
+foo (struct A *x, unsigned int *y, int z, int u)
+{
+ int a, b, c, d, e;
+
+ z += *y;
+ c = z + u;
+ a = (z >> 12) + 1;
+ do
+ {
+ b = (a << 12);
+ d = b - z;
+ e = c - z;
+ if (e < d)
+ d = e;
+ baz (bar (x, z), 0, d);
+ z = b;
+ a++;
+ }
+ while (z < c);
+ return 0;
+}