This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Move pr36038.c testcase into gcc.c-torture/execute/


Hi!

This testcase was meant to be executed, but I've mistakenly
put it into gcc.c-torture/compile/.  Fixed thusly, committed to trunk.

2008-11-19  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/36038
	* gcc.c-torture/compile/pr36038.c: Moved to...
	* gcc.c-torture/execute/pr36038.c: ... here.

--- gcc/testsuite/gcc.c-torture/execute/pr36038.c.jj	2008-11-19 12:01:49.000000000 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr36038.c	2008-10-24 15:57:21.000000000 +0200
@@ -0,0 +1,43 @@
+/* PR tree-optimization/36038 */
+
+long long list[10];
+long long expect[10] = { 0, 1, 2, 3, 4, 4, 5, 6, 7, 9 };
+long long *stack_base;
+int indices[10];
+int *markstack_ptr;
+
+void
+doit (void)
+{
+  long long *src;
+  long long *dst;
+  long long *sp = stack_base + 5;
+  int diff = 2;
+  int shift;
+  int count;
+
+  shift = diff - (markstack_ptr[-1] - markstack_ptr[-2]);
+  count = (sp - stack_base) - markstack_ptr[-1] + 2;
+  src = sp;
+  dst = (sp += shift);
+  while (--count)
+    *dst-- = *src--;
+}
+
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 10; i++)
+    list[i] = i;
+
+  markstack_ptr = indices + 9;
+  markstack_ptr[-1] = 2;
+  markstack_ptr[-2] = 1;
+
+  stack_base = list + 2;
+  doit ();
+  if (__builtin_memcmp (expect, list, sizeof (list)))
+    __builtin_abort ();
+  return 0;
+}
--- gcc/testsuite/gcc.c-torture/compile/pr36038.c	2008-10-24 15:57:21.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/compile/pr36038.c	2008-09-30 10:18:57.740011359 +0200
@@ -1,43 +0,0 @@
-/* PR tree-optimization/36038 */
-
-long long list[10];
-long long expect[10] = { 0, 1, 2, 3, 4, 4, 5, 6, 7, 9 };
-long long *stack_base;
-int indices[10];
-int *markstack_ptr;
-
-void
-doit (void)
-{
-  long long *src;
-  long long *dst;
-  long long *sp = stack_base + 5;
-  int diff = 2;
-  int shift;
-  int count;
-
-  shift = diff - (markstack_ptr[-1] - markstack_ptr[-2]);
-  count = (sp - stack_base) - markstack_ptr[-1] + 2;
-  src = sp;
-  dst = (sp += shift);
-  while (--count)
-    *dst-- = *src--;
-}
-
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 10; i++)
-    list[i] = i;
-
-  markstack_ptr = indices + 9;
-  markstack_ptr[-1] = 2;
-  markstack_ptr[-2] = 1;
-
-  stack_base = list + 2;
-  doit ();
-  if (__builtin_memcmp (expect, list, sizeof (list)))
-    __builtin_abort ();
-  return 0;
-}

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]