Hi, it isn't true that I didn't replied to Iant. I did this on IRC. As I explained there already, this hunk about thunks is more consolidation of code-paths in that function, and not really part of a feature. As this code-path isn't prominent mark being Darwin-code - and please don't take me wrong, but it seems to be until now the only target reporting this issues - and therefore I strongly see the issue to be solved for Darwin. I don't see that this changes needs an additional testcase demonstration on a already regression-tested target that it doesn't break ... This is somehow like asking for gcc-testcase demostration that gcc's darwin target isn't responsible for earth's warming ...
Nevertheless I provided in the past already a patch which fixes the issue well. As underlying issue seems to be that gotpcrel relocations aren't suitable for call-instruction's address on Darwin's target. So disallowing for this the use via the operand-check-predicate is the right thing to do. As this prevents in all cases that for this target such a construct might be generated even for none-thunk case, which seems btw not being problematic at all. I don't agree to revert that patch. Please provide a testcase, why my suggested fix isn't suitable. Regards, Kai