------- Comment #17 from matz at gcc dot gnu dot org 2008-02-24 19:50 ------- Honza: No recursion is involved here. I guess (Tege: correct me if I'm wrong) that already the first call to __gmp_mt_recalc_buffer() from __gmp_randget_mt() will segfault, as the first call obviously will end up in the dynamic linker, and that one wants to have $rsp aligned on 8 mod 16.
But I wonder how that could happen. After all the __gmp_randget_mt function is global, not local, and can be overridden, so why would GCC assume that just because it knows its body it can ignore the usual alignment requirements for global functions? Is it possible that the darwin support in GCC determines that randget_mt is a local function (perhaps because MACH-O doesn't allow symbol interposition like ELF does)? In that case we can't do this optimization in the darwin case. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35271
