pr17133.c: New.
authorGeoffrey Keating <geoffk@apple.com>
Fri, 4 Mar 2005 01:38:56 +0000 (01:38 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Fri, 4 Mar 2005 01:38:56 +0000 (01:38 +0000)
* gcc.c-torture/execute/pr17133.c: New.
* gcc.c-torture/compile/20050303-1.c: New.

From-SVN: r95865

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20050303-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr17133.c [new file with mode: 0644]

index 8766cb7586ad15d0e14de983695008eee7fd5654..e589f7bff525ed9d65efc00df311bc6a7baeb84a 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-03  Geoffrey Keating  <geoffk@apple.com>
+
+       * gcc.c-torture/execute/pr17133.c: New.
+       * gcc.c-torture/compile/20050303-1.c: New.
+
 2005-03-04  David Billinghurst  <David.Billinghurst@riotinto.com>
 
        * gcc.dg/cpp/assert4.c:  Fix for cygwin
diff --git a/gcc/testsuite/gcc.c-torture/compile/20050303-1.c b/gcc/testsuite/gcc.c-torture/compile/20050303-1.c
new file mode 100644 (file)
index 0000000..5993a45
--- /dev/null
@@ -0,0 +1,10 @@
+void crc()
+{
+    int  toread;
+    long long nleft;
+    unsigned char buf[(128 * 1024)];
+
+    nleft = 0;
+    while (toread = (nleft < (2147483647 * 2U + 1U)) ? nleft: (2147483647 * 2U + 1U) )
+       ;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr17133.c b/gcc/testsuite/gcc.c-torture/execute/pr17133.c
new file mode 100644 (file)
index 0000000..63352c0
--- /dev/null
@@ -0,0 +1,27 @@
+extern void abort (void);
+
+int foo = 0;
+void *bar = 0;
+unsigned int baz = 100;
+
+void *pure_alloc ()
+{
+  void *res;
+  
+  while (1)
+    {
+      res = (void *) ((((unsigned int) (foo + bar))) & ~1);
+      foo += 2;
+      if (foo < baz)
+        return res;
+      foo = 0;
+    }
+}
+
+int main ()
+{
+  pure_alloc ();
+  if (!foo)
+    abort ();
+  return 0;
+}