diff --git a/tools/qfcc/source/dags.c b/tools/qfcc/source/dags.c index 7a27aec7e..b1ef8c97a 100644 --- a/tools/qfcc/source/dags.c +++ b/tools/qfcc/source/dags.c @@ -50,6 +50,7 @@ #include "statements.h" #include "strpool.h" #include "symtab.h" +#include "type.h" static daglabel_t *free_labels; static dagnode_t *free_nodes; @@ -546,7 +547,9 @@ dag_gencode (dag_t *dag, sblock_t *block, dagnode_t *dagnode) operands[2] = temp_operand (get_type (dagnode->label->expr)); } else { daglabel_t *var = dag->labels[var_iter->member]; - etype_t type = extract_type (dagnode->label->expr); + etype_t type; + + type = low_level_type (get_type (dagnode->label->expr)); operands[2] = fix_op_type (var->op, type); var_iter = set_next (var_iter); } diff --git a/tools/qfcc/source/dot_expr.c b/tools/qfcc/source/dot_expr.c index 62d6ac7ef..fc1afd4d6 100644 --- a/tools/qfcc/source/dot_expr.c +++ b/tools/qfcc/source/dot_expr.c @@ -184,8 +184,9 @@ print_block (dstring_t *dstr, expr_t *e, int level, int id) dasprintf (dstr, "%*se_%p -> e_%p;\n", indent, "", e, e->e.block.result); } - dasprintf (dstr, "%*se_%p -> e_%p [style=dashed];\n", indent, "", e, - e->e.block.head); + if (e->e.block.head) + dasprintf (dstr, "%*se_%p -> e_%p [style=dashed];\n", indent, "", e, + e->e.block.head); //dasprintf (dstr, "%*ssubgraph cluster_%p {\n", indent, "", e); for (se = e->e.block.head; se; se = se->next) { _print_expr (dstr, se, level + 1, id); @@ -272,7 +273,8 @@ print_uexpr (dstring_t *dstr, expr_t *e, int level, int id) dstring_copystr (typestr, "\\n"); print_type_str (typestr, e->e.expr.type); } - dasprintf (dstr, "%*se_%p -> e_%p;\n", indent, "", e, e->e.expr.e1); + if (e->e.expr.op != 'r' || e->e.expr.e1) + dasprintf (dstr, "%*se_%p -> e_%p;\n", indent, "", e, e->e.expr.e1); dasprintf (dstr, "%*se_%p [label=\"%s%s\\n%d\"];\n", indent, "", e, get_op_string (e->e.expr.op), typestr->str, e->line); dstring_delete (typestr); diff --git a/tools/qfcc/source/statements.c b/tools/qfcc/source/statements.c index 0e33071fc..6b9e3efc3 100644 --- a/tools/qfcc/source/statements.c +++ b/tools/qfcc/source/statements.c @@ -1418,7 +1418,7 @@ make_statements (expr_t *e) { sblock_t *sblock = new_sblock (); //sblock_t *s; -// print_expr (e); + //dump_dot ("expr", e, dump_dot_expr); statement_slist (sblock, e); if (options.block_dot.initial) dump_dot ("initial", sblock, dump_dot_sblock);