[llvm-commits] [parallel] CVS: llvm/test/Programs/SingleSource/Regression/C/2004-02-03-AggregateCopy.c casts.c 2004-01-01-UnknownInitSize.c
Misha Brukman
brukman at cs.uiuc.edu
Mon Mar 1 19:40:34 PST 2004
Changes in directory llvm/test/Programs/SingleSource/Regression/C:
2004-02-03-AggregateCopy.c added (r1.1.2.1)
casts.c updated: 1.3 -> 1.3.14.1
2004-01-01-UnknownInitSize.c (r1.1) removed
---
Log message:
Merge from trunk
---
Diffs of the changes: (+25 -1)
Index: llvm/test/Programs/SingleSource/Regression/C/2004-02-03-AggregateCopy.c
diff -c /dev/null llvm/test/Programs/SingleSource/Regression/C/2004-02-03-AggregateCopy.c:1.1.2.1
*** /dev/null Mon Mar 1 17:59:24 2004
--- llvm/test/Programs/SingleSource/Regression/C/2004-02-03-AggregateCopy.c Mon Mar 1 17:59:14 2004
***************
*** 0 ****
--- 1,14 ----
+ #include <stdio.h>
+
+ typedef struct {
+ int X;
+ } agg;
+
+ int main() {
+ agg A; A.X = 123;
+ agg B, C;
+ B = C = A;
+
+ printf("%d, %d, %d\n", A.X, B.X, C.X);
+ }
+
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.3.14.1
--- 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 Mon Mar 1 17:59:14 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