[llvm-commits] CVS: llvm/test/Programs/SingleSource/Regression/C/casts.c
Chris Lattner
lattner at cs.uiuc.edu
Sun Feb 22 21:10:05 PST 2004
Changes in directory llvm/test/Programs/SingleSource/Regression/C:
casts.c updated: 1.3 -> 1.4
---
Log message:
Test for handling of 1 << 63, which the X86 asm printer dies on, and for
casting from ULL to double, which is unimplemented in the X86 backend.
---
Diffs of the changes: (+11 -1)
Index: llvm/test/Programs/SingleSource/Regression/C/casts.c
diff -u llvm/test/Programs/SingleSource/Regression/C/casts.c:1.3 llvm/test/Programs/SingleSource/Regression/C/casts.c:1.4
--- llvm/test/Programs/SingleSource/Regression/C/casts.c:1.3 Fri Sep 27 08:26:36 2002
+++ llvm/test/Programs/SingleSource/Regression/C/casts.c Sun Feb 22 21:09:02 2004
@@ -5,6 +5,10 @@
#include <inttypes.h>
+static int64_t lls[] = {
+ 123ULL, -1LL, -14LL, 14, 1ULL << 63, 0
+};
+
int
main(int argc, char** argv)
{
@@ -14,7 +18,7 @@
short S, s1;
unsigned short us1;
- int i1;
+ int i1, i;
unsigned ui1;
int64_t L, l1;
@@ -121,6 +125,12 @@
printf("double to ushort us1 = %u\t\t(0x%x)\n", us1, us1);
printf("double to uint ui1 = %u\t\t(0x%x)\n", ui1, ui1);
printf("double to ulong ul1 = %lu\t\t(0x%lx)\n", ul1, ul1);
+
+ for (i = 0; lls[i]; ++i) {
+ printf("double <- long long %lld = %f\n", lls[i], (double)lls[i]);
+ printf("double <- unsigned long long %llu = %f\n",
+ (unsigned long long)lls[i], (double)(unsigned long long)lls[i]);
+ }
return 0;
}
More information about the llvm-commits
mailing list