mescc: Fix struct field comparison.
* module/language/c99/compiler.mes (expr->accu, ast->info): Some push/pop fixes, fixes struct field comparisons. * doc/examples/t.c (struct_test): Test it.
This commit is contained in:
parent
9a02352a15
commit
bcf1b2a356
|
@ -805,7 +805,8 @@ _)))))
|
||||||
(list (lambda (f g ta t d)
|
(list (lambda (f g ta t d)
|
||||||
(i386:push-base)))
|
(i386:push-base)))
|
||||||
(.text accu)
|
(.text accu)
|
||||||
(i386:pop-accu)
|
(list (lambda (f g ta t d)
|
||||||
|
(i386:pop-base)))
|
||||||
(list (lambda (f g ta t d)
|
(list (lambda (f g ta t d)
|
||||||
(i386:sub-base)))))))
|
(i386:sub-base)))))))
|
||||||
|
|
||||||
|
@ -1619,7 +1620,8 @@ _)))))
|
||||||
(list (lambda (f g ta t d)
|
(list (lambda (f g ta t d)
|
||||||
(i386:push-base)))
|
(i386:push-base)))
|
||||||
(.text accu)
|
(.text accu)
|
||||||
(i386:pop-accu)
|
(list (lambda (f g ta t d)
|
||||||
|
(i386:pop-base)))
|
||||||
(list (lambda (f g ta t d)
|
(list (lambda (f g ta t d)
|
||||||
(i386:sub-base)))))))
|
(i386:sub-base)))))))
|
||||||
|
|
||||||
|
@ -1680,6 +1682,8 @@ _)))))
|
||||||
(list (lambda (f g ta t d)
|
(list (lambda (f g ta t d)
|
||||||
(i386:push-base)))
|
(i386:push-base)))
|
||||||
(.text accu)
|
(.text accu)
|
||||||
|
(list (lambda (f g ta t d)
|
||||||
|
(i386:pop-base)))
|
||||||
(list (lambda (f g ta t d)
|
(list (lambda (f g ta t d)
|
||||||
(i386:base-sub)))))))
|
(i386:base-sub)))))))
|
||||||
|
|
||||||
|
@ -1693,6 +1697,8 @@ _)))))
|
||||||
(list (lambda (f g ta t d)
|
(list (lambda (f g ta t d)
|
||||||
(i386:push-base)))
|
(i386:push-base)))
|
||||||
(.text accu)
|
(.text accu)
|
||||||
|
(list (lambda (f g ta t d)
|
||||||
|
(i386:pop-base)))
|
||||||
(list (lambda (f g ta t d)
|
(list (lambda (f g ta t d)
|
||||||
(i386:base-sub)))))))
|
(i386:base-sub)))))))
|
||||||
|
|
||||||
|
|
|
@ -228,6 +228,13 @@ make_tmps_test (struct scm* cells)
|
||||||
int
|
int
|
||||||
struct_test ()
|
struct_test ()
|
||||||
{
|
{
|
||||||
|
g_cells[0].type = TNUMBER;
|
||||||
|
g_cells[1].type = TNUMBER;
|
||||||
|
puts ("t: TYPE (0) != TYPE (1)\n");
|
||||||
|
if (TYPE (0) == TYPE (1)) goto ok;
|
||||||
|
return 1;
|
||||||
|
ok:
|
||||||
|
|
||||||
g_cells[0].car = 1;
|
g_cells[0].car = 1;
|
||||||
g_cells[1].car = 2;
|
g_cells[1].car = 2;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue