mescc: Tinycc support: bugfix *foo = bar.
* module/language/c99/compiler.mes (base->ident-address): Typo, fixes (non-char*)*x = y. * scaffold/tests/77-pointer-assign.c (test): Test it.
This commit is contained in:
parent
2e0c1c0aff
commit
17e0e0cab7
|
@ -395,7 +395,7 @@
|
||||||
4)))
|
4)))
|
||||||
(wrap-as (append (i386:local->accu (local:id local))
|
(wrap-as (append (i386:local->accu (local:id local))
|
||||||
(if (= size 1) (i386:byte-base->accu-address)
|
(if (= size 1) (i386:byte-base->accu-address)
|
||||||
(i386:byte-base->accu-address)))))
|
(i386:base->accu-address)))))
|
||||||
(let ((size 4)) ;; FIXME
|
(let ((size 4)) ;; FIXME
|
||||||
(wrap-as (append (i386:label-mem->accu `(#:address ,o))
|
(wrap-as (append (i386:label-mem->accu `(#:address ,o))
|
||||||
(if (= size 1) (i386:byte-base->accu-address)
|
(if (= size 1) (i386:byte-base->accu-address)
|
||||||
|
|
|
@ -57,9 +57,8 @@ test ()
|
||||||
eputs ("f.bar:"); eputs (itoa (f.bar)); eputs ("\n");
|
eputs ("f.bar:"); eputs (itoa (f.bar)); eputs ("\n");
|
||||||
if (f.bar != 0x11223344) return 1;
|
if (f.bar != 0x11223344) return 1;
|
||||||
add2 (&f.bar);
|
add2 (&f.bar);
|
||||||
// FIXME
|
eputs ("f.bar:"); eputs (itoa (f.bar)); eputs ("\n");
|
||||||
// eputs ("f.bar:"); eputs (itoa (f.bar)); eputs ("\n");
|
if (f.bar != 0x22334455) return 2;
|
||||||
// if (f.bar != 0x22334455) return 2;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue