shithub: scc

Download patch

ref: 6635e122751e5c87ee80dfd72e358e74848ca0f0
parent: c8e1837d9e661d706c6b43b8930b16308404f3e2
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Jan 20 05:02:04 EST 2017

[cc2-qbe] Do not try to load functions

It is impossible to load a function in a temporary in the
same way that it is impossible to load an aggregate. The
only thing we can do is to passthrough the node.

--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
@@ -118,7 +118,7 @@
 	int op;
 	int flags = tp->flags;
 
-	if (flags & AGGRF) {
+	if (flags & (AGGRF|FUNF)) {
 		*new = *np;
 		return new;
 	}