diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0df0df6d5a4..5b7471de374 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-03-07 Richard Sandiford + + * gcc.dg/unordered-1.c: New test. + 2002-03-07 Richard Earnshaw * 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 index 00000000000..1310532de33 --- /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" } */ +}