I created this as issue #41908 on gcc bugzilla. It seems that libffi gets the closure code wrong for cases where a structure argument containing more than two floats is passed, with the result that the called function sees a structure containing incorrect values. I attached a testcase to the bugzilla issue.