summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/builtins-error.c
blob: 9f401bba1a02ca377083157a3eb58de950226028 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */

struct X { int x; };

int test1(struct X x)
{
  return __builtin_isnormal(x); /* { dg-error "non-floating-point argument" } */
}

int test2(double x)
{
  return __builtin_isgreater(x); /* { dg-error "not enough arguments" } */
}

int test3(double x)
{
  return __builtin_isinf(x, x); /* { dg-error "too many arguments" } */
}