shithub: scc

Download patch

ref: c94328210580bb413ba01f7db622470e41676693
parent: b1b5c5787733eefb5d185743b368a4eef483aae9
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat Oct 30 12:57:07 EDT 2021

cc2/qbe: Do nothing for conversions to void

Conversions to void case was not considered and it was aborting,
when the only thing to do is just doing nothing.

--- a/src/cmd/cc/cc2/target/qbe/cgen.c
+++ b/src/cmd/cc/cc2/target/qbe/cgen.c
@@ -266,6 +266,8 @@
 	int op;
 
 	switch (tp->size) {
+	case 0:
+		return from;
 	case 1:
 		op = ASCOPYB;
 		break;