https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91627
--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> --- -bash-4.4$ cat /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/lto/20081201-2_0.c /* { dg-lto-options {{-O3 -flto -flto-partition=1to1}} } */ /* Test that cross-TU inlining works. */ extern void abort (); extern void exit (int); extern void *foo (void); int main () { if (foo () != __builtin_return_address (0)) abort (); exit (0); } (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /test/gnu/gcc/objdir/gcc/testsuite/gcc/gcc-dg-lto-20081201-2-01.exe warning: Private mapping of shared library text was not specified by the executable; setting a breakpoint in a shared library which is not privately mapped will not work. See the HP-UX 11i v3 chatr manpage for methods to privately map shared library text. Breakpoint 2, 0x4000000000005644 in main () at /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/lto/20081201-2_0.c:12 12 if (foo () != __builtin_return_address (0)) (gdb) disass Dump of assembler code for function main: 0x4000000000005628 <+0>: std rp,-10(sp) 0x400000000000562c <+4>: std,ma r4,80(sp) 0x4000000000005630 <+8>: ldo -30(sp),ret1 0x4000000000005634 <+12>: std r3,-78(sp) 0x4000000000005638 <+16>: copy rp,r3 0x400000000000563c <+20>: b,l 0x4000000000002c60 <foo>,rp 0x4000000000005640 <+24>: copy dp,r4 => 0x4000000000005644 <+28>: cmpb,*<> r3,ret0,0x4000000000005658 <main+48> 0x4000000000005648 <+32>: copy r4,dp 0x400000000000564c <+36>: ldo -30(sp),ret1 0x4000000000005650 <+40>: b,l 0x40000000000019c0 <.stub>,rp 0x4000000000005654 <+44>: ldi 0,r26 0x4000000000005658 <+48>: ldo -30(sp),ret1 0x400000000000565c <+52>: b,l 0x4000000000005668 <.stub>,rp 0x4000000000005660 <+56>: nop 0x4000000000005664 <+60>: nop End of assembler dump. (gdb) p/x $r3 $4 = 0xc00000000000b8fb (gdb) p/x $ret0 $5 = 0x4000000000005647