summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/unsigned-float.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/aarch64/unsigned-float.c')
-rw-r--r--gcc/testsuite/gcc.target/aarch64/unsigned-float.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/unsigned-float.c b/gcc/testsuite/gcc.target/aarch64/unsigned-float.c
new file mode 100644
index 00000000000..c5ad6805d94
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/unsigned-float.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+#include <stdint.h>
+
+double
+f1 (uint16_t x)
+{
+ return (double)(float)x;
+}
+
+float
+f2 (uint16_t x)
+{
+ return (float)(double)x;
+}
+
+/* { dg-final { scan-assembler-not "fcvt" } } */