2 new testcases

H.J. Lu hjl@lucon.org
Tue Jun 30 21:15:00 GMT 1998


Hi,

Here are 2 new testcases.


-- 
H.J. Lu (hjl@gnu.org)
---
Tue Jun 30 20:33:15 1998  H.J. Lu  (hjl@gnu.org)

	* execute/980630-1.c: New test case.

	* execute/980630-2.c: New test case.

--- /dev/null	Wed Dec 31 16:00:00 1969
+++ execute/980630-1.c	Tue Jun 30 20:07:49 1998
@@ -0,0 +1,17 @@
+long A [2] = {0};
+long B [2] = {2, 0};
+
+main ()
+{
+  unsigned int i;
+  long long u;
+  for (i = 0; i < 2; i+=2)
+  {
+    u = A [i] + B [i];
+    u = (long long) (*(((long *)&( u ))+1)) + A [i+1] + B [i+1];
+    A [i+1] = (long) u;
+  }
+  if (A [1] != 0)
+    abort ();
+  return 0;
+}
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ execute/980630-2.c	Tue Jun 30 20:08:15 1998
@@ -0,0 +1,31 @@
+int
+ns_name_skip (unsigned char **pptr, unsigned char *eom)
+{
+  if (eom)
+  {
+    (*pptr)++;
+    return 0;
+  }
+  return -1;  
+}
+
+int
+dn_skipname(unsigned char *ptr, unsigned char *eom)
+{
+    unsigned char *saveptr = ptr;
+
+    if (ns_name_skip(&ptr, eom) == -1)
+                return (-1);
+    return (ptr - saveptr);
+}
+
+main ()
+{
+  unsigned char foo [20];
+  unsigned char eom [10];
+
+  if (dn_skipname (foo, eom) == 0)
+    abort ();
+
+  return 0;
+}



More information about the Gcc-patches mailing list