diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index fe7cbc4e8..aed88121c 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -1674,6 +1674,7 @@ get_name (const expr_t *e) symbol_t * get_struct_field (const type_t *t1, const expr_t *e1, const expr_t *e2) { + t1 = unalias_type (t1); symtab_t *strct = t1->symtab; symbol_t *sym = get_name (e2); symbol_t *field; diff --git a/tools/qfcc/source/expr_binary.c b/tools/qfcc/source/expr_binary.c index 5494b7c92..290e90687 100644 --- a/tools/qfcc/source/expr_binary.c +++ b/tools/qfcc/source/expr_binary.c @@ -1394,11 +1394,11 @@ binary_expr (int op, const expr_t *e1, const expr_t *e2) } if (is_constant (e1) && is_double (t1) && e1->implicit && is_float (t2)) { - t1 = float_type (t2); + t1 = float_type (base_type (t2)); e1 = cast_expr (t1, e1); } if (is_constant (e2) && is_double (t2) && e2->implicit && is_float (t1)) { - t2 = float_type (t1); + t2 = float_type (base_type (t1)); e2 = cast_expr (t2, e2); } if (is_array (t1) && (is_pointer (t2) || is_integral (t2))) { diff --git a/tools/qfcc/source/glsl-declaration.c b/tools/qfcc/source/glsl-declaration.c index 28caa9246..ae2bf822d 100644 --- a/tools/qfcc/source/glsl-declaration.c +++ b/tools/qfcc/source/glsl-declaration.c @@ -45,7 +45,7 @@ void glsl_parse_declaration (specifier_t spec, symbol_t *sym, const expr_t *init, symtab_t *symtab, expr_t *block) { - if (sym->type) { + if (sym && sym->type) { internal_error (0, "unexected typed symbol"); } auto attributes = glsl_optimize_attributes (spec.attributes);