Commit a81870ba authored by Russ Cox's avatar Russ Cox

add error to catch 6g alignment bug.

the fix appears to be to align the
out struct on an 8 boundary, but that
is a bit involved.

R=ken
OCL=24657
CL=24657
parent a6c59ce2
......@@ -1906,6 +1906,11 @@ ascompatte(int op, Type **nl, Node **nr, int fp)
&& structnext(&peekl) != T
&& listnext(&peekr) == N
&& eqtypenoname(r->type, *nl)) {
// clumsy check for differently aligned structs.
// need to handle eventually, but this keeps us
// from inserting bugs
if(r->type->width != (*nl)->width)
yyerror("misaligned multiple return (6g's fault)");
a = nodarg(*nl, fp);
a->type = r->type;
return convas(nod(OAS, a, r));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment