From 38fd09573f12af496a862340ab5ea8bde0786aaa Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 5 Jun 2023 09:42:33 +0900 Subject: [PATCH] [qfcc] Avoid defining whole temp via alias Like defs, a partial write should not define the whole temp. Thus, copy the "don't visit main" behavior recently added to def_visit_all. Fixes missing ud-chains for component-by-component assignments to temporary vectors. --- tools/qfcc/source/statements.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/statements.c b/tools/qfcc/source/statements.c index 1be1042d0..a1c78f9d7 100644 --- a/tools/qfcc/source/statements.c +++ b/tools/qfcc/source/statements.c @@ -452,8 +452,9 @@ tempop_visit_all (tempop_t *tempop, int overlap, internal_error (top->expr, "temp alias of non-temp operand"); } tempop = &top->tempop; - if ((ret = visit (tempop, data))) + if (!(overlap & 4) && (ret = visit (tempop, data))) return ret; + overlap &= ~4; } else { overlap = 0; }