tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: netbsd-11 gcc bug



On Sat, May 23, 2026 at 02:22:22PM +0300, Valery Ushakov wrote:
> On Sat, May 23, 2026 at 10:59:36 +0200, Manuel Bouyer wrote:
> 
> > But it seems to assume that fr cannot be NULL here but I can't find
> > on which basis. Any idea how I could force a NULL check here ?
> 
> -fno-delete-null-pointer-checks

thanks, but it doesn't seem to do the job here. With
#pragma GCC optimize ("no-delete-null-pointer-checks")
instead of
#pragma GCC optimize ("O1")

I get:

1221                    if (!fr || !(fr->fr_flags & FR_RETMASK)) {
   0xffffffff8056dff3 <+1763>:  mov    -0xd8(%rbp),%r8
   0xffffffff8056dffa <+1770>:  mov    -0xf0(%rbp),%r9
   0xffffffff8056e001 <+1777>:  testl  $0x3000,0xec(%r8)
   0xffffffff8056e00c <+1788>:  je     0xffffffff8056e326 <ipf_fastroute+2582>
   0xffffffff8056e012 <+1794>:  mov    %r9,-0xd8(%rbp)

1225                    }

> 
> -uwe
> 

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index