public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite][committed] Move target independent test to c.torture
@ 2015-09-20 17:13 Oleg Endo
  0 siblings, 0 replies; only message in thread
From: Oleg Endo @ 2015-09-20 17:13 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

Hi,

The attached patch moves a target independent test that was hanging
around in gcc.target/sh to gcc.c-torture/compile.
Committed as r227945.

Cheers,
Oleg

testsuite/ChangeLog:
	* gcc.target/sh/pr43417.c: Move target independent test to ...
	* gcc.c-torture/compile/pr43417.c: ... here.

[-- Attachment #2: move_pr43417_test.patch --]
[-- Type: text/x-patch, Size: 2176 bytes --]

Index: gcc/testsuite/gcc.c-torture/compile/pr43417.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr43417.c	(revision 0)
+++ gcc/testsuite/gcc.c-torture/compile/pr43417.c	(working copy)
@@ -0,0 +1,39 @@
+int pid_count = 0;
+
+unsigned int getopt (int, const char**, const char*);
+unsigned long long atoll (const char*);
+int fork (void);
+void kill (int, int);
+
+int
+main (int argc, const char *argv[])
+{
+  unsigned int c;
+  unsigned long long maxbytes = 0;
+  extern const char *optarg;
+  int i;
+  int pid_cntr;
+  int pid;
+  int pid_list[1000];
+  while ((c = getopt (argc, argv, "c:b:p:wvh")) != (-1))
+    {
+      switch ((char) c)
+	{
+	case 'b':
+	  maxbytes = atoll (optarg);
+	}
+    }
+  pid = fork ();
+  while ((pid != 0) && (maxbytes > 1024 * 1024 * 1024))
+    {
+      maxbytes = maxbytes - (1024 * 1024 * 1024);
+      pid = fork ();
+      if (pid != 0)
+	pid_cntr++;
+      pid_list[i] = pid;
+    }
+  while ((pid_count < pid_cntr))
+    {
+    }
+  kill (pid_list[i], 9);
+}
Index: gcc/testsuite/gcc.target/sh/pr43417.c
===================================================================
--- gcc/testsuite/gcc.target/sh/pr43417.c	(revision 227943)
+++ gcc/testsuite/gcc.target/sh/pr43417.c	(working copy)
@@ -1,43 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -m4" } */
-
-int pid_count = 0;
-
-unsigned int getopt (int, const char**, const char*);
-unsigned long long atoll (const char*);
-int fork (void);
-void kill (int, int);
-
-int
-main (int argc, const char *argv[])
-{
-  unsigned int c;
-  unsigned long long maxbytes = 0;
-  extern const char *optarg;
-  int i;
-  int pid_cntr;
-  int pid;
-  int pid_list[1000];
-  while ((c = getopt (argc, argv, "c:b:p:wvh")) != (-1))
-    {
-      switch ((char) c)
-	{
-	case 'b':
-	  maxbytes = atoll (optarg);
-	}
-    }
-  pid = fork ();
-  while ((pid != 0) && (maxbytes > 1024 * 1024 * 1024))
-    {
-      maxbytes = maxbytes - (1024 * 1024 * 1024);
-      pid = fork ();
-      if (pid != 0)
-	pid_cntr++;
-      pid_list[i] = pid;
-    }
-  while ((pid_count < pid_cntr))
-    {
-    }
-  kill (pid_list[i], 9);
-}
-

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-20 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-20 17:13 [testsuite][committed] Move target independent test to c.torture Oleg Endo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).