ref: acdc9fd4e91cc45e69bd07c9488bb4b22866129d
parent: eee39d9575319970fc311677ed1f00ae7b2e2396
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Jan 24 11:28:33 EST 2017
[cc2-qbe] Check void type out of int and floats Voidtype hasn't any of the flags INTF or FLOATF, so it was generating an abort()
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
@@ -310,7 +310,6 @@
{
if (tp->flags & INTF) {
switch (tp->size) {
- case 0:
case 1:
case 2:
case 4:
@@ -323,6 +322,8 @@
return "s";
else if (tp->size == 8)
return "d";
+ } else if (tp->size == 0) {
+ return "w";
}
abort();
}