https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70064
--- Comment #12 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Jakub Jelinek from comment #5) > So, shall we silently disable -mred-zone for -fpic/-fPIE in 32-bit code? > Or error out in that combination? > Or disable it only if we need PIC pointer? > What about other cases where one can have calls in leaf functions (say the > various -p/-mfentry cases, or are those considered non-leaf)? > Or is this simply a user error? FTR, the patch disables redzone when call to pc thunk is emitted in the current function. mcount and __fentry__ are called before redzone is accessed, so they are safe.