Fix union array bug (Issue #112)

This commit is contained in:
Ginger Bill
2017-09-29 21:35:59 +01:00
parent e6e9375b09
commit 8c7cf0dbb0
4 changed files with 32 additions and 24 deletions
+1 -1
View File
@@ -399,7 +399,7 @@ void ir_print_compound_element(irFileBuffer *f, irModule *m, ExactValue v, Type
ir_print_type(f, m, elem_type);
ir_write_byte(f, ' ');
if (v.kind == ExactValue_Invalid || base_type(elem_type) == t_any) {
if (v.kind == ExactValue_Invalid || !elem_type_can_be_constant(elem_type)) {
if (ir_type_has_default_values(elem_type)) {
ir_print_exact_value(f, m, v, elem_type);
} else {