From 78962cb205cf5d36b7f58e795b736ae4ecd9005b Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 29 Mar 2020 10:27:16 +0900 Subject: [PATCH] [qwaq] Use append_type in field/pointer/array_type This fixes the missing alias chain splitter, allowing scheme to compile again. --- tools/qfcc/source/type.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/qfcc/source/type.c b/tools/qfcc/source/type.c index 08a02855b..dab0b844e 100644 --- a/tools/qfcc/source/type.c +++ b/tools/qfcc/source/type.c @@ -453,9 +453,9 @@ field_type (type_t *aux) new = new_type (); new->type = ev_field; new->alignment = 1; - new->t.fldptr.type = aux; - if (aux) - new = find_type (new); + if (aux) { + new = find_type (append_type (new, aux)); + } return new; } @@ -471,9 +471,9 @@ pointer_type (type_t *aux) new = new_type (); new->type = ev_pointer; new->alignment = 1; - new->t.fldptr.type = aux; - if (aux) - new = find_type (new); + if (aux) { + new = find_type (append_type (new, aux)); + } return new; } @@ -487,15 +487,15 @@ array_type (type_t *aux, int size) memset (&_new, 0, sizeof (_new)); else new = new_type (); + new->meta = ty_array; new->type = ev_invalid; if (aux) { new->alignment = aux->alignment; } - new->meta = ty_array; - new->t.array.type = aux; new->t.array.size = size; - if (aux) - new = find_type (new); + if (aux) { + new = find_type (append_type (new, aux)); + } return new; }