mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-10 00:20:01 +08:00
* gcc.dg/unordered-1.c: New test.
From-SVN: r50402
This commit is contained in:
parent
71925bc04f
commit
e106e1b07e
@ -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.
|
||||
|
18
gcc/testsuite/gcc.dg/unordered-1.c
Normal file
18
gcc/testsuite/gcc.dg/unordered-1.c
Normal file
@ -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" } */
|
||||
}
|
Loading…
Reference in New Issue
Block a user