aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/fp16-inf.c
blob: ce5c197c12183e2b4e272adebac0d32caba5a3ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do run } */
/* { dg-options "-O -mfp16-format=ieee" } */

/* Conversion of infinity to __fp16 and back again should preserve the
   value.  */
volatile float f = __builtin_inf ();

int main ()
{
  __fp16 h = f;
  if (h != __builtin_inf ())
    __builtin_abort ();
  return 0;
}