diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-05-05 13:59:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-05-05 13:59:13 +0900 |
| commit | d0642298179e9aa2ea3c20c132417a5842979daa (patch) | |
| tree | e526c14898455af1b786795ce046426329e940ff | |
| parent | d69d3821580cceb37a8c8f4a270db8d2c3f6d1c8 (diff) | |
| download | P4Dcc-d0642298179e9aa2ea3c20c132417a5842979daa.tar.gz P4Dcc-d0642298179e9aa2ea3c20c132417a5842979daa.tar.zst P4Dcc-d0642298179e9aa2ea3c20c132417a5842979daa.zip | |
fix issue where "for" init expr is not popped out
| -rw-r--r-- | main.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1752,6 +1752,7 @@ void gen_for_stmt(struct CodeGen* g, struct AstNode* ast) { if (ast->expr1) { gen_expr(g, ast->expr1, GEN_RVAL); + printf(" pop rax\n"); } printf(".Lbegin%d:\n", label); gen_expr(g, ast->expr2, GEN_RVAL); |
