This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
some random Apple testcases
- From: gkeating at apple dot com (Geoffrey Keating)
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 Mar 2005 17:38:04 -0800 (PST)
- Subject: some random Apple testcases
I found versions of these in our tree marked as local, and there's no
point in that.
Checked by running dejagnu on just these cases.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-testsuite-boguslocals.patch===========
2005-03-03 Geoffrey Keating <geoffk@apple.com>
* gcc.c-torture/execute/pr17133.c: New.
* gcc.c-torture/compile/20050303-1.c: New.
Index: gcc.c-torture/compile/20050303-1.c
===================================================================
RCS file: gcc.c-torture/compile/20050303-1.c
diff -N gcc.c-torture/compile/20050303-1.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gcc.c-torture/compile/20050303-1.c 4 Mar 2005 01:36:34 -0000
@@ -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) )
+ ;
+}
Index: gcc.c-torture/execute/pr17133.c
===================================================================
RCS file: gcc.c-torture/execute/pr17133.c
diff -N gcc.c-torture/execute/pr17133.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gcc.c-torture/execute/pr17133.c 4 Mar 2005 01:36:38 -0000
@@ -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;
+}
============================================================