OSDN Git Service

Four new tests
authorcrux <crux@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Dec 1999 12:37:50 +0000 (12:37 +0000)
committercrux <crux@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Dec 1999 12:37:50 +0000 (12:37 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30759 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/gcc.c-torture/ChangeLog
gcc/testsuite/gcc.c-torture/compile/991202-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/991202-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/991202-2.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/991202-3.c [new file with mode: 0644]

index b37ebfd..53c8386 100644 (file)
@@ -1,3 +1,10 @@
+1999-12-02  Bernd Schmidt  <bernds@cygnus.co.uk>
+
+       * compile/991202-1.c: New test.
+       * execute/991202-1.c: New test.
+       * execute/991202-2.c: New test.
+       * execute/991202-3.c: New test.
+
 1999-11-27  Bernd Schmidt  <bernds@cygnus.co.uk>
 
        * compile/991127-1.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/991202-1.c b/gcc/testsuite/gcc.c-torture/compile/991202-1.c
new file mode 100644 (file)
index 0000000..cc4f478
--- /dev/null
@@ -0,0 +1,18 @@
+extern float A[], B[];
+extern float MAXNUMF;
+float chbevlf(float, float *, int);
+float expf(float), i1f(float), logf(float), sqrtf(float);
+
+float k1f(float xx)
+{
+  float x, y;
+
+  x = xx;
+  if( x <= 2.0 )
+    {
+      y = x * x - 2.0;
+      y =  logf( 0.5f * x ) * i1f(x)  +  chbevlf( y, A, 7 ) / x;
+      return( y );
+    }
+  return(  expf(-x) * chbevlf( (float)(8.0/x - 2.0), B, 10 ) / sqrtf(x) );
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/991202-1.c b/gcc/testsuite/gcc.c-torture/execute/991202-1.c
new file mode 100644 (file)
index 0000000..502acc7
--- /dev/null
@@ -0,0 +1,16 @@
+int x, y;
+
+int
+main()
+{
+  x = 2;
+  y = x;
+  do
+    {
+      x = y;
+      y = 2 * y;
+    }
+  while ( ! ((y - x) >= 20));
+  exit (0);
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/991202-2.c b/gcc/testsuite/gcc.c-torture/execute/991202-2.c
new file mode 100644 (file)
index 0000000..fa97e2d
--- /dev/null
@@ -0,0 +1,17 @@
+
+int
+f1 ()
+{
+  unsigned long x, y = 1;
+
+  x = ((y * 8192) - 216) % 16;
+  return x;
+}
+
+int
+main ()
+{
+  if (f1 () != 8)
+    abort ();
+  exit (0);
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/991202-3.c b/gcc/testsuite/gcc.c-torture/execute/991202-3.c
new file mode 100644 (file)
index 0000000..f5718b2
--- /dev/null
@@ -0,0 +1,22 @@
+
+unsigned int f (unsigned int a)
+{
+  return a * 65536 / 8;
+}
+
+unsigned int g (unsigned int a)
+{
+  return a * 65536;
+}
+
+unsigned int h (unsigned int a)
+{
+  return a / 8;
+}
+
+int main ()
+{
+  if (f (65536) != h (g (65536)))
+    abort ();
+  exit (0);
+}