https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63890
--- Comment #18 from Jan Hubicka <hubicka at ucw dot cz> --- > I'm happy to defer the question to the person that reviews the patch for the > tree. I'd like a codegen type person that understands the proposed change to > review it. They may feel perfectly comfortable approving it for the tree now. Well, I think the patch is in area I can review (though I would welcome second opinion as I am nothappy about solution at all). The way the call is output is broken by design. final.c is outputting optimized function body and after seeing NOTE_INSN_PROLOGUE_END it calls a hook that output assembler blob in there. This made sense in early 90's but not much today when prologues are optimized into rest of the code. We make no promises about stack alignment at the place NOTE_INSN_PROLOGUE_END is inserted. So either someone needs to step forward and implement profile_before_prologue version or we can go with a hack. I do not have darwin setup to test either. My understanding is that currently profiling is completely broken (segfaults on empty propgram). If the patch helps profiling to be resonably working, and lacking better altenatives I would go for it.