[qfcc] Demote implicit double vector literals correctly

The code for demoting the literals wasn't taking the width into account.
This commit is contained in:
Bill Currie 2023-08-29 08:02:11 +09:00
parent 8de722bfc7
commit 327cb88af3
1 changed files with 2 additions and 2 deletions

View File

@ -1128,11 +1128,11 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
}
if (is_constant (e1) && is_double (t1) && e1->implicit && is_float (t2)) {
t1 = &type_float;
t1 = float_type (t2);
e1 = cast_expr (t1, e1);
}
if (is_constant (e2) && is_double (t2) && e2->implicit && is_float (t1)) {
t2 = &type_float;
t2 = float_type (t1);
e2 = cast_expr (t2, e2);
}
if (is_array (t1) && (is_ptr (t2) || is_integral (t2))) {