[qfcc] Support vector value expressions for spir-v

It seems constant initializers are different from constants in an
expression.
This commit is contained in:
Bill Currie 2024-11-15 17:52:01 +09:00
parent 27afd608f1
commit 22794caf11
3 changed files with 46 additions and 1 deletions

View file

@ -77,6 +77,10 @@ math_constructor (const type_t *type, const expr_t *params, const expr_t *e)
if (!ptype) {
continue;
}
if (is_reference (ptype)) {
pexpr = pointer_deref (pexpr);
ptype = dereference_type (ptype);
}
if (!is_math (ptype)) {
components[c++] = error (pexpr, "invalid type for conversion");
continue;