[qfcc] Ensure scale expressions have the correct type

fold_constants was replacing the pseudoscalar type with a float. I
really need to rewrite that whole block sometime.
This commit is contained in:
Bill Currie 2023-09-11 12:29:10 +09:00
parent eb9954700a
commit 91c3049348

View file

@ -486,9 +486,9 @@ scale_expr (type_t *type, expr_t *a, expr_t *b)
scale = fold_constants (scale);
if (neg) {
scale = neg_expr (scale);
scale->e.expr.type = type;
scale = fold_constants (scale);
}
scale = cast_expr (type, scale);
return scale;
}