This is a bigger issue than I first thought, and will take a while to fully fix.
In particular, there are remaining issue wrt. register parameters.
In [r13701], all issues except for the register parameter one should be fixed, but that one is so serious, that we can't generatecorrect code.
Some corner cases work now, and for the rest there is now an error message instead of a crash. I'll leave the bug report open until this is fully fixed.

 

Related

Commit: [r13701]