https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65797
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Blocks| |63572 Target Milestone|12.5 |12.0 Resolution|--- |FIXED See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=97937, | |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=63572 --- Comment #26 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >When I compile this -g -O2 -fno-optimize-sibling-calls on x86_64 f2 is >converted into a function that does nothing but call f3. The opposite happens starting in GCC 7. Note starting in GCC 9, -fno-optimize-sibling-calls becomes ineffective. Note starting in GCC 10, you need -fno-inline-functions, otherwise f2 will inline into f3. Starting in GCC 12, we get a line information for f3 now for the sibcall: ``` f3: .LFB5: .cfi_startproc .loc 1 29 1 is_stmt 1 view .LVU15 jmp f2 .cfi_endproc ``` That was changed due to PR 97937 which was marked as a dup of bug 63572 rather than this one. So this specific issue is fixed now. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63572 [Bug 63572] [12/13/14/15 Regression] ICF breaks user debugging experience