* test/cast2.cb: test cast from long* to int*.

* test/test.sh: change result.


git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@3798 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
Minero Aoki 2008-01-04 22:36:45 +00:00
parent 6e3f520a14
commit 67442a4801
3 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,9 @@
Sat Jan 5 07:36:43 2008 Minero Aoki <aamine@loveruby.net>
* test/cast2.cb: test cast from long* to int*.
* test/test.sh: change result.
Sat Jan 5 07:33:06 2008 Minero Aoki <aamine@loveruby.net>
* net/loveruby/cflat/compiler/CodeGenerator.java

View File

@ -3,8 +3,13 @@ import stdio;
int
main(int argc, char **argv)
{
int i = 0;
int i = 777;
int* ptr = &i;
printf("%d\n", *(int*)ptr);
long x = 666;
long* lp = &x;
printf("%d;%d\n", *(int*)ptr, *(int*)lp);
return 0;
}

View File

@ -185,7 +185,7 @@ assert_out "1;2;1073741824;-2147483648;0" ./longops # 32bit
assert_out "1;2;1073741824;2147483648;0" ./ulongops # 32bit
assert_out "25000000" ./cast
assert_out "0" ./cast2
assert_out "777;666" ./cast2
assert_out "2" ./block
assert_out "1;2;3" ./defvar