ref: 2212714411ce559905b48a82f81770995bd656a7
parent: 859d8c8282bff77c84a73ab61d55c3532e667590
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Dec 14 21:11:20 EST 2015
Don't die on zero sized structs.
--- a/6/isel.c
+++ b/6/isel.c
@@ -409,6 +409,8 @@
Loc *tmp, *src, *dst; /* source memory, dst memory */
assert(szmodes[align] != ModeNone); /* make sure we have a valid alignment */
+ if (!sz)
+ return;
sp = inr(s, from);
dp = inr(s, to);
--- a/6/typeinfo.c
+++ b/6/typeinfo.c
@@ -329,7 +329,7 @@
align = max(align, tyalign(decltype(ty->sdecls[i])));
break;
default:
- align = tysize(ty);
+ align = max(align, tysize(ty));
}
return min(align, Ptrsz);
}