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:
Jan Nieuwenhuizen 2017-07-28 15:45:22 +02:00
parent 2e0c1c0aff
commit 17e0e0cab7
2 changed files with 3 additions and 4 deletions

View File

@ -395,7 +395,7 @@
4)))
(wrap-as (append (i386:local->accu (local:id local))
(if (= size 1) (i386:byte-base->accu-address)
(i386:byte-base->accu-address)))))
(i386:base->accu-address)))))
(let ((size 4)) ;; FIXME
(wrap-as (append (i386:label-mem->accu `(#:address ,o))
(if (= size 1) (i386:byte-base->accu-address)

View File

@ -57,9 +57,8 @@ test ()
eputs ("f.bar:"); eputs (itoa (f.bar)); eputs ("\n");
if (f.bar != 0x11223344) return 1;
add2 (&f.bar);
// FIXME
// eputs ("f.bar:"); eputs (itoa (f.bar)); eputs ("\n");
// if (f.bar != 0x22334455) return 2;
eputs ("f.bar:"); eputs (itoa (f.bar)); eputs ("\n");
if (f.bar != 0x22334455) return 2;
return 0;
}