summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/unordered-1.c
blob: 1310532de33affa9d092cfc29ab4389a8d3c5504 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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" } */
}