Subject: Re: unrecognizable insn
To: Patrick Welche <>
From: Christian Biere <>
List: current-users
Date: 10/09/2002 07:56:37,u
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Patrick Welche <> wrote:

> On i386 with source of Oct  7 07:36 GMT, I get
> /usr/src/tools/obj.i386/tools.NetBSD-1.6I-i386/bin/i386--netbsdelf-gcc 
> -ffreestanding  -pipe -Werror -Wall -Wno-main -Wno-format-zero-length
> -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes
> -Wno-uninitialized  -Di386 -I.  -I/usr/src/sys/arch -I/usr/src/sys
> -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT   -c
> /usr/src/sys/dev/pci/if_pcn.c/usr/src/sys/dev/pci/if_pcn.c: In function
> `pcn_init':/usr/src/sys/dev/pci/if_pcn.c:1767: internal
> error--unrecognizable insn:(insn 644 643 646 (set (reg:SI 170)
>         (unspec:SI[ 
>                 (const_int 512 [0x200])
>             ]  5)) -1 (nil)
>     (nil))
> cpp0: output pipe has been closed

I'm pretty sure it's the compiler's fault. I'm using gcc 3.2 and it hangs
at the same line of code. My system isn't overclocked. It's a plain AMD
Duron 900 Mhz with 256 DDR-RAM. AFAIK I haven't had any problems with
memory corruption yet. This should not be reproducible if it were a
problem of memory corruption. The revision of if_pcn.c is 1.14 from
2002-10-02. This is what gcc 3.2 tells me:

cc  -ffreestanding  -pipe   -Di386 -I.  -I../../../../arch -I../../../..
/sys/arch/i386/compile/GENER IC/../../../../dev/pci/if_pcn.c
/sys/dev/pci/if_pcn.c: In function `pcn_init':
/sys/dev/pci/if_pcn.c:1767: unrecognizable insn:
(insn 640 639 641 (parallel[ 
            (set (reg:CCZ 17 flags)
                (compare:CCZ (const_int 512 [0x200])
                    (const_int 0 [0x0])))
            (set (reg:SI 203)
                        (const_int 512 [0x200])
                    ]  5))
        ] ) -1 (nil)
/sys/dev/pci/if_pcn.c:1767: Internal compiler error in extract_insn, at

But there's a trick. I have used "export DEFCOPTS=-pipe". Normally,
DEFCOPTS would be -O2 and if I use this the compiler won't fail. Note
that "-O2 -pipe" works as well. I would have expected optimizing might
lead to problems in rare cases but here *not* optimizing triggers the bug.
I haven't submitted a bug report yet or even looked whether it's a known

Content-Type: application/pgp-signature

Version: GnuPG v1.2.0 (NetBSD)

-----END PGP SIGNATURE-----,u--