summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@l3000.localdomain>2011-03-24 22:39:21 -0400
committerSøren Sandmann Pedersen <ssp@l3000.localdomain>2011-03-24 22:39:21 -0400
commit1978230573decfc81bd869a670d4cc77519e9227 (patch)
treef9036178d52ef78a089eab2301d2ce28f00ec7e4 /util.c
parent5190fd0943488a4b314c4df3a4640a386649c2bb (diff)
Fix bugs related to dyn_label.
This node would reference a label, but do so *indirectly* though a reference to a label definition in the AST. That caused problems when the optimizer would remove the corresponding *node* label and not update the dyn label to match. Instead, simply store the actual node, and make dyn_label a source node for that label.
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 1b888a9..9f22ca1 100644
--- a/util.c
+++ b/util.c
@@ -350,7 +350,7 @@ value_to_string (value_t *val, ast_type_spec_t *type)
break;
case AST_LABEL_TYPE:
- return g_strdup_printf ("label %p\n", val->label_val.label->statement->node);
+ return g_strdup_printf ("label %p\n", val->label_val.label);
break;
case AST_ARRAY_TYPE: