Index: libcfa/src/heap.cfa
===================================================================
--- libcfa/src/heap.cfa	(revision 8446c186284cfbd6fc0677df5b1e3b1ab197d1b5)
+++ libcfa/src/heap.cfa	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
@@ -509,5 +509,4 @@
 	checkHeader( header < (Heap.Storage.Header *)heapBegin || (Heap.Storage.Header *)heapEnd < header, name, addr ); // bad address ? (offset could be + or -)
 
-	Heap * homeManager;
 	if ( unlikely( freeHead == 0p || // freed and only free-list node => null link
 				   // freed and link points at another free block not to a bucket in the bucket array.
Index: src/AST/Inspect.cpp
===================================================================
--- src/AST/Inspect.cpp	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
+++ src/AST/Inspect.cpp	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
@@ -0,0 +1,32 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Node.hpp --
+//
+// Author           : Thierry Delisle
+// Created On       : Fri Jun 24 13:16:31 2022
+// Last Modified By :
+// Last Modified On :
+// Update Count     :
+//
+
+#include "AST/Decl.hpp"
+#include "AST/Type.hpp"
+
+#include <iostream>
+#include <AST/Print.hpp>
+
+namespace ast {
+	bool structHasFlexibleArray( const ast::StructDecl * decl ) {
+		if(decl->members.size() == 0) return false;
+		const auto & last = *decl->members.rbegin();
+		auto lastd = last.as<ast::DeclWithType>();
+		if(!lastd) return false; // I don't know what this is possible, but it might be.
+		auto atype = dynamic_cast<const ast::ArrayType *>(lastd->get_type());
+		if(!atype) return false;
+		return !atype->isVarLen && !atype->dimension;
+	}
+};
Index: src/AST/Inspect.hpp
===================================================================
--- src/AST/Inspect.hpp	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
+++ src/AST/Inspect.hpp	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
@@ -0,0 +1,20 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Node.hpp --
+//
+// Author           : Thierry Delisle
+// Created On       : Fri Jun 24 13:16:31 2022
+// Last Modified By :
+// Last Modified On :
+// Update Count     :
+//
+
+#include "AST/Fwd.hpp"
+
+namespace ast {
+	bool structHasFlexibleArray( const ast::StructDecl * );
+}
Index: src/AST/module.mk
===================================================================
--- src/AST/module.mk	(revision 8446c186284cfbd6fc0677df5b1e3b1ab197d1b5)
+++ src/AST/module.mk	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
@@ -37,4 +37,6 @@
 	AST/Init.cpp \
 	AST/Init.hpp \
+	AST/Inspect.cpp \
+	AST/Inspect.hpp \
 	AST/Label.hpp \
 	AST/LinkageSpec.cpp \
Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision 8446c186284cfbd6fc0677df5b1e3b1ab197d1b5)
+++ src/CodeGen/CodeGenerator.cc	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
@@ -294,5 +294,5 @@
 				} else {
 					if ( obj->get_init() ) {
-						obj->get_init()->accept( *visitor ); 
+						obj->get_init()->accept( *visitor );
 					} else {
 						// Should not reach here!
@@ -683,8 +683,10 @@
 		extension( variableExpr );
 		const OperatorInfo * opInfo;
-		if ( variableExpr->get_var()->get_linkage() == LinkageSpec::Intrinsic && (opInfo = operatorLookup( variableExpr->get_var()->get_name() )) && opInfo->type == OT_CONSTANT ) {
+		if( dynamic_cast<ZeroType*>( variableExpr->get_var()->get_type() ) ) {
+			output << "0";
+		} else if ( variableExpr->get_var()->get_linkage() == LinkageSpec::Intrinsic && (opInfo = operatorLookup( variableExpr->get_var()->get_name() )) && opInfo->type == OT_CONSTANT ) {
 			output << opInfo->symbol;
 		} else {
-			// if (dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type()) 
+			// if (dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())
 			// && dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())->baseEnum->base) {
 			// 	output << '(' <<genType(dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())->baseEnum->base, "", options) << ')';
Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 8446c186284cfbd6fc0677df5b1e3b1ab197d1b5)
+++ src/GenPoly/Box.cc	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
@@ -1277,5 +1277,6 @@
 			FunctionType * ftype = functionDecl->type;
 			if ( ! ftype->returnVals.empty() && functionDecl->statements ) {
-				if ( ! isPrefix( functionDecl->name, "_thunk" ) && ! isPrefix( functionDecl->name, "_adapter" ) ) { // xxx - remove check for prefix once thunks properly use ctor/dtors
+				// intrinsic functions won't be using the _retval so no need to generate it.
+				if ( functionDecl->linkage != LinkageSpec::Intrinsic && !isPrefix( functionDecl->name, "_thunk" ) && ! isPrefix( functionDecl->name, "_adapter" ) ) { // xxx - remove check for prefix once thunks properly use ctor/dtors
 					assert( ftype->returnVals.size() == 1 );
 					DeclarationWithType * retval = ftype->returnVals.front();
Index: src/Validate/Autogen.cpp
===================================================================
--- src/Validate/Autogen.cpp	(revision 8446c186284cfbd6fc0677df5b1e3b1ab197d1b5)
+++ src/Validate/Autogen.cpp	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
@@ -28,4 +28,5 @@
 #include "AST/DeclReplacer.hpp"
 #include "AST/Expr.hpp"
+#include "AST/Inspect.hpp"
 #include "AST/Pass.hpp"
 #include "AST/Stmt.hpp"
@@ -121,5 +122,5 @@
 
 	// Built-ins do not use autogeneration.
-	bool shouldAutogen() const final { return !decl->linkage.is_builtin; }
+	bool shouldAutogen() const final { return !decl->linkage.is_builtin && !structHasFlexibleArray(decl); }
 private:
 	void genFuncBody( ast::FunctionDecl * decl ) final;
@@ -183,7 +184,9 @@
 	{
 		// TODO: These functions are somewhere between instrinsic and autogen,
-		// could possibly use a new linkage type. For now we just make them
-		// intrinsic to code-gen them as C assignments.
-		proto_linkage = ast::Linkage::Intrinsic;
+		// could possibly use a new linkage type. For now we just make the
+		// basic ones intrinsic to code-gen them as C assignments.
+		const auto & real_type = decl->base;
+		const auto & basic = real_type.as<ast::BasicType>();
+		if(!real_type || (basic && basic->isInteger())) proto_linkage = ast::Linkage::Intrinsic;
 	}
 
@@ -402,8 +405,4 @@
 	auto retval = srcParam();
 	retval->name = "_ret";
-	// xxx - Adding this unused attribute can slience unused variable warning
-	// However, some code might not be compiled as expected
-	// Temporarily disabled
-	// retval->attributes.push_back(new ast::Attribute("unused"));
 	return genProto( "?=?", { dstParam(), srcParam() }, { retval } );
 }
Index: tests/.expect/attributes.nast.arm64.txt
===================================================================
--- tests/.expect/attributes.nast.arm64.txt	(revision 8446c186284cfbd6fc0677df5b1e3b1ab197d1b5)
+++ tests/.expect/attributes.nast.arm64.txt	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
@@ -1334,5 +1334,4 @@
     }
     inline enum __anonymous4 _X16_operator_assignFM12__anonymous4_M12__anonymous4M12__anonymous4_intrinsic___2(enum __anonymous4 *_X4_dstM12__anonymous4_2, enum __anonymous4 _X4_srcM12__anonymous4_2){
-        enum __anonymous4 _X4_retM12__anonymous4_2;
         {
             ((void)((*_X4_dstM12__anonymous4_2)=_X4_srcM12__anonymous4_2));
Index: tests/.expect/attributes.nast.x64.txt
===================================================================
--- tests/.expect/attributes.nast.x64.txt	(revision 8446c186284cfbd6fc0677df5b1e3b1ab197d1b5)
+++ tests/.expect/attributes.nast.x64.txt	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
@@ -1334,5 +1334,4 @@
     }
     inline enum __anonymous4 _X16_operator_assignFM12__anonymous4_M12__anonymous4M12__anonymous4_intrinsic___2(enum __anonymous4 *_X4_dstM12__anonymous4_2, enum __anonymous4 _X4_srcM12__anonymous4_2){
-        enum __anonymous4 _X4_retM12__anonymous4_2;
         {
             ((void)((*_X4_dstM12__anonymous4_2)=_X4_srcM12__anonymous4_2));
Index: tests/.expect/attributes.nast.x86.txt
===================================================================
--- tests/.expect/attributes.nast.x86.txt	(revision 8446c186284cfbd6fc0677df5b1e3b1ab197d1b5)
+++ tests/.expect/attributes.nast.x86.txt	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
@@ -1334,5 +1334,4 @@
     }
     inline enum __anonymous4 _X16_operator_assignFM12__anonymous4_M12__anonymous4M12__anonymous4_intrinsic___2(enum __anonymous4 *_X4_dstM12__anonymous4_2, enum __anonymous4 _X4_srcM12__anonymous4_2){
-        enum __anonymous4 _X4_retM12__anonymous4_2;
         {
             ((void)((*_X4_dstM12__anonymous4_2)=_X4_srcM12__anonymous4_2));
Index: tests/.expect/attributes.oast.x64.txt
===================================================================
--- tests/.expect/attributes.oast.x64.txt	(revision 8446c186284cfbd6fc0677df5b1e3b1ab197d1b5)
+++ tests/.expect/attributes.oast.x64.txt	(revision 6e21aaf1c64d563a591847b4aeb47d4c69a618b0)
@@ -1334,5 +1334,4 @@
     }
     inline enum __anonymous4 _X16_operator_assignFM12__anonymous4_M12__anonymous4M12__anonymous4_intrinsic___2(enum __anonymous4 *_X4_dstM12__anonymous4_2, enum __anonymous4 _X4_srcM12__anonymous4_2){
-        enum __anonymous4 _X4_retM12__anonymous4_2;
         {
             ((void)((*_X4_dstM12__anonymous4_2)=_X4_srcM12__anonymous4_2));
