diff options
| author | 2025-11-23 21:54:40 +0100 | |
|---|---|---|
| committer | 2025-11-23 21:57:01 +0100 | |
| commit | 6464ec389e2da17b1674858858406e211b16e5f6 (patch) | |
| tree | 1b82b733851b88a0868635c6ab5afe1ea2298b7c /c | |
| parent | d79251d487b57ea0e3b10640747eed723a06365c (diff) | |
ir: implement cvtu64f. and other bug fixes
compiler is bootstrapping?! however, stage1 and stage2+ executables
aren't bit-identical.. small differences in the codegen.. need to look into that
Diffstat (limited to 'c')
| -rw-r--r-- | c/c.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -3051,11 +3051,14 @@ condexprrec(struct function *fn, const struct expr *ex, struct condphis *phis, condexprrec(fn, &ex->sub[2], phis, phityp, -1, end, end); } else { union ref r, val; + union type valty; if (!phis && (!next || next == end)) { expreffects(fn, ex); } else { val = r = exprvalue(fn, ex); + valty = ex->ty; if (boolcon >= 0) { + valty = mktype(TYBOOL); if (!next || next == end) { boolcon = -1; val = cvt(fn, mktype(TYBOOL), ex->ty, r); @@ -3066,7 +3069,7 @@ condexprrec(struct function *fn, const struct expr *ex, struct condphis *phis, } if (phis) { if (isscalar(phityp)) - val = cvt(fn, phityp, ex->ty, val); + val = cvt(fn, phityp, valty, val); else assert(ex->ty.bits == phityp.bits); vpush(&phis->ref, val); } |