diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-07-02 01:03:58 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-07-02 01:03:58 +0200 |
commit | 5fe14d15635d62becb90a7c4277b89e8981b983c (patch) | |
tree | bb981feb1837cf195daac827b2f6a782bbfe44c7 /src | |
parent | 21d3e8c4bf7726b3ad4180119d75ccc0f69cf32b (diff) |
Fix out-of-order definitions
Diffstat (limited to 'src')
-rw-r--r-- | src/analyzer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/analyzer.c b/src/analyzer.c index 5f5771d..6dff9ff 100644 --- a/src/analyzer.c +++ b/src/analyzer.c @@ -626,13 +626,12 @@ constfoldexpr(struct azctx *ctx, type_t *T, idx_t i) case ASTCDECL: { idx_t expr = ctx->ast.kids[sym->i].rhs; assert(expr != AST_EMPTY); - MPQCPY(ctx->folds[i], ctx->folds[expr]); if (!MPQ_IS_INIT(ctx->folds[i])) { ctx->si = lvl; (void)constfolddecl(ctx, sym->i); - MPQCPY(ctx->folds[i], ctx->folds[expr]); - assert(MPQ_IS_INIT(ctx->folds[i])); } + MPQCPY(ctx->folds[i], ctx->folds[expr]); + assert(MPQ_IS_INIT(ctx->folds[i])); ni = fwdnode(ctx->ast, i); goto out; } |