diff mbox

[Committed] Add some more testcases

Message ID CA+=Sn1n1MxFycYz=7=piBfVByyx4ZkKbeRGJRqdFRsWWfXnyPQ@mail.gmail.com
State New
Headers show

Commit Message

Andrew Pinski Nov. 23, 2014, 12:29 p.m. UTC
Hi,
  While looking at what patches I had in the internal tree here at
Cavium, I noticed two more testcases which I did upstream already.
One testcase for PR 53135 (reduced from dhcp-server) and another one
for an ICE which showed up while improving PHI-OPT (reduced from
gnupg-2.0.18).

Committed as obvious after a test.

Thanks,
Andrew

ChangeLog:
* gcc.c-torture/compile/20120927-1.c: New testcase.
* gcc.c-torture/compile/20120830-1.c: New testcase.
diff mbox

Patch

Index: testsuite/gcc.c-torture/compile/20120927-1.c
===================================================================
--- testsuite/gcc.c-torture/compile/20120927-1.c	(revision 0)
+++ testsuite/gcc.c-torture/compile/20120927-1.c	(revision 0)
@@ -0,0 +1,43 @@ 
+void ff(int);
+int isc_fsaccess_set(unsigned int access) {
+ unsigned int mode;
+ unsigned int bits;
+ mode = 0;
+ bits = 0x00000021;
+ if ((access & bits) != 0) 
+  {
+   mode |= 0400;
+   access &= ~bits;
+  }
+ access &= ~bits; 
+ bits <<= (10);
+ if ((access & bits) != 0)
+   access &= ~bits; 
+ bits = 0x00000012;
+ if ((access & bits) != 0)
+ {
+   mode |= 0200; 
+   access &= ~bits; 
+ }
+ mode |= (0200 >> 3);
+ access &= ~bits; 
+ bits <<= (10);
+ if ((access & bits) != 0)
+   mode |= ((0200 >> 3) >> 3);
+ bits = 0x00000044;
+ if ((access & bits) != 0)
+ { 
+    mode |= 0100;
+    access &= ~bits;
+ }
+ if ((access & bits) != 0)
+ {
+   mode |= (0100 >> 3);
+   access &= ~bits; 
+ }; 
+ bits <<= (10);
+ if ((access & bits) != 0)
+   mode |= ((0100 >> 3) >> 3);
+ ff(mode) ;
+}
+
Index: testsuite/gcc.c-torture/compile/20120830-1.c
===================================================================
--- testsuite/gcc.c-torture/compile/20120830-1.c	(revision 0)
+++ testsuite/gcc.c-torture/compile/20120830-1.c	(revision 0)
@@ -0,0 +1,14 @@ 
+int keyring_search(void);
+int keydb_search2 (int *hdfound, int *hdcurrent, int *a)
+{
+    int rc = -1;
+    while (rc == -1) {
+        if (*a == 1)
+            rc = keyring_search ();
+        if (rc == -1)
+            *hdcurrent++;
+	if (!rc)
+            *hdfound = *hdcurrent;
+    }
+    return rc;
+}