diff --git a/tools/qfcc/test/typedef.r b/tools/qfcc/test/typedef.r index bb5d52e4a..e6e80a92b 100644 --- a/tools/qfcc/test/typedef.r +++ b/tools/qfcc/test/typedef.r @@ -22,10 +22,12 @@ next_type (qfot_type_t *type) } int -check_alias (qfot_type_t *alias) +check_alias (string name, qfot_type_t *alias) { - if (alias.meta != ty_basic && alias.t.type != ev_pointer) { - printf ("%s is not a *int alias\n", alias.t.alias.name); + if (alias.meta != ty_basic || alias.t.type != ev_pointer + || alias.t.fldptr.aux_type.meta != ty_basic + || alias.t.fldptr.aux_type.t.type != ev_integer) { + printf ("%s is not a *int alias\n", name); return 0; } return 1; @@ -47,10 +49,12 @@ main (void) type = next_type (type)) { if (type.meta == ty_alias) { if (type.t.alias.name == "foo") { - found_foo = check_alias (type.t.alias.aux_type); + found_foo = check_alias (type.t.alias.name, + type.t.alias.aux_type); } if (type.t.alias.name == "bar") { - found_bar = check_alias (type.t.alias.aux_type); + found_bar = check_alias (type.t.alias.name, + type.t.alias.aux_type); } } }