https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120881
--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Uroš Bizjak from comment #15) > Comment on attachment 61783 [details] > A patch to place mcount at the function entry with shrink > > >@@ -493,7 +493,7 @@ ix86_using_red_zone (void) > > static bool > > ix86_profile_before_prologue (void) > > { > >- return flag_fentry != 0; > >+ return (TARGET_64BIT && SHRINK_WRAPPING_ENABLED) || flag_fentry != 0; > > Should we use crtl->shrink_wrapped (or crtl->shrink_wrapped_separate) here > instead? crtl->shrink_wrapped isn't for checking if shrink wrapping is enabled: /* All is okay, so do it. */ crtl->shrink_wrapped = true; if (dump_file) fprintf (dump_file, "Performing shrink-wrapping.\n"); ... targetm.shrink_wrap.set_handled_components (components); crtl->shrink_wrapped_separate = true; } SHRINK_WRAPPING_ENABLED is for checking if shrink wrapping is enabled.