https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97431
Oleg Endo <olegendo at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2020-10-15 Status|UNCONFIRMED |NEW --- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to John Paul Adrian Glaubitz from comment #3) > r11 0x5 5 > r12 0x299f367c 698300028 > r13 0x8b8 2232 > r14 0x2a15f4a0 706081952 > > Disassembled function: > > Dump of assembler code for function long_richcompare: > 0x29631850 <+0>: mov.l r8,@-r15 > 0x29631852 <+2>: mova 0x296318e8 <long_richcompare+152>,r0 > 0x29631854 <+4>: mov.l r12,@-r15 > 0x29631856 <+6>: mov.l @(4,r4),r1 > 0x29631858 <+8>: mov.l 0x296318e8 <long_richcompare+152>,r12 ! > 0x3c1d94 > 0x2963185a <+10>: add #64,r1 > 0x2963185c <+12>: mov.l @(20,r1),r2 > 0x2963185e <+14>: mov.l 0x296318ec <long_richcompare+156>,r1 ! > 0x1000000 > 0x29631860 <+16>: tst r1,r2 > 0x29631862 <+18>: bt.s 0x296318d8 <long_richcompare+136> > 0x29631864 <+20>: add r0,r12 > 0x29631866 <+22>: mov.l @(4,r5),r2 > 0x29631868 <+24>: add #64,r2 > 0x2963186a <+26>: mov.l @(20,r2),r2 > 0x2963186c <+28>: tst r1,r2 > 0x2963186e <+30>: bt.s 0x296318d8 <long_richcompare+136> > 0x29631870 <+32>: cmp/eq r5,r4 > 0x29631872 <+34>: bt.s 0x29631940 <long_richcompare+240> > 0x29631874 <+36>: mov #5,r1 > 0x29631876 <+38>: mov.l @(8,r4),r7 > 0x29631878 <+40>: mov.l @(8,r5),r1 > 0x2963187a <+42>: mov r7,r8 > 0x2963187c <+44>: cmp/eq r1,r7 > 0x2963187e <+46>: bf.s 0x296318e8 <long_richcompare+152> > 0x29631880 <+48>: sub r1,r8 > > .... > > 0x296318e6 <+150>: mov.l @r15+,r8 > => 0x296318e8 <+152>: mov.l r9,@(16,r13) Just to point out the obvious, r13 is never initialized nor referenced by anything else throughout the function. What are the compiler options?