* gcc.dg/unordered-1.c: New test.
authorRichard Sandiford <rsandifo@redhat.com>
Thu, 7 Mar 2002 11:39:13 +0000 (11:39 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 7 Mar 2002 11:39:13 +0000 (11:39 +0000)
From-SVN: r50402

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/unordered-1.c [new file with mode: 0644]

index 0df0df6d5a4fb9b9f74d13639783ff041facb637..5b7471de374a636547842243ca786c99e0fe8cd5 100644 (file)
@@ -1,3 +1,7 @@
+2002-03-07  Richard Sandiford  <rsandifo@redhat.com>
+
+       * gcc.dg/unordered-1.c: New test.
+
 2002-03-07  Richard Earnshaw  <rearnsha@arm.com>
 
        * gcc.c-torture/execute/20020307-1.c: New test.
diff --git a/gcc/testsuite/gcc.dg/unordered-1.c b/gcc/testsuite/gcc.dg/unordered-1.c
new file mode 100644 (file)
index 0000000..1310532
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+
+void bar (int);
+
+void foo (int i, float f)
+{
+  bar (__builtin_isgreater (i, i));    /* { dg-error "non-floating-point" } */
+  bar (__builtin_isgreater (f, i));
+  bar (__builtin_isgreater (i, f));
+  bar (__builtin_isgreater (f, 2));
+  bar (__builtin_isgreater (f, 2.0f));
+  bar (__builtin_isgreater (f, 2.0));
+  bar (__builtin_isgreater (2, f));
+  bar (__builtin_isgreater (2.0f, f));
+  bar (__builtin_isgreater (2.0, f));
+  bar (__builtin_isgreater (&f, i));   /* { dg-error "non-floating-point" } */
+  bar (__builtin_isgreater (f, &i));   /* { dg-error "non-floating-point" } */
+}