summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/arm-fp16/fp16-overload-1.C
blob: bf0139d7cef111d91c5e8951ba646fe281341b70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile { target arm*-*-* } } */
/* { dg-options "-mfp16-format=ieee" } */

/* __fp16 values are autoconverted to float and should therefore be treated
 * just like float for overloading purposes.  */

extern int frobnify (float x);
extern int frobnify (double x);

int g (void)
{
  return frobnify ((__fp16)1.0);
}

/* { dg-final { scan-assembler "_Z8frobnifyf" } } */
/* { dg-final { scan-assembler-not " _Z8frobnifyd" } } */