On Sunday, December 30, 2012, edA-qa mort-ora-y wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can confirm that if I generate the value directly (not via a return)<br>
then the expected values are extracted from the structure. So it is<br>
perhaps a return value issue.<br>
</blockquote><div><br></div><div> I think most backends treat struct return by value as returning multiple values in registers; for instance, {i32, i64} returns into {EAX, RDX} on x86-64. Since most architectures don't specify any more than two return registers and you can't really "spill" a return value, weird poorly-tested<span></span> things probably happen if you try to return a struct with more elements than the backend has return registers for. You could try returning larger structs indirectly using an sret pointer like Clang does.</div>