diff --git a/module/language/c99/compiler.mes b/module/language/c99/compiler.mes index fd1f2fc3..cbe444e9 100644 --- a/module/language/c99/compiler.mes +++ b/module/language/c99/compiler.mes @@ -1293,8 +1293,8 @@ (rank (->rank type)) (type-b (ast->type b info)) (rank-b (->rank type-b)) - (size (->size type)) - (size-b (->size type-b)) + (size (if (zero? rank) (->size type) 4)) + (size-b (if (zero? rank-b) (->size type-b) 4)) (info (expr->accu b info)) (info (if (equal? op "=") info (let* ((struct? (structured-type? type)) @@ -1326,7 +1326,7 @@ (when (and (equal? op "=") (not (= size size-b)) (not (and (or (= size 1) (= size 2)) - (= size-b 4))) + (or (= size-b 2) (= size-b 4)))) (not (and (= size 2) (= size-b 4))) (not (and (= size 4)