summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/unordered-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/unordered-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/unordered-1.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/unordered-1.c b/gcc/testsuite/gcc.dg/unordered-1.c
new file mode 100644
index 000000000..1310532de
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/unordered-1.c
@@ -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" } */
+}