Re: "insn does not satisfy its constraints" compiling perl

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.os.netbsd.ports.vax
Message-ID <117531e4d1e4423bfda21660053c3e06cac62855.camel@physik.fu-berlin.de>
Hi John,

On Sat, 2026-02-28 at 20:33 +0000, John Klos wrote:
> My NetBSD 11_RC1 VAXstation VLC is working valiantly to compile the latest 
> perl from pkgsrc. Two days and 16 hours later:
> 
> gcc -c -DPERL_CORE -O2 -pthread -I/usr/include -fwrapv 
> -fno-strict-aliasing -pipe -I/usr/local/include -std=c99 -O2 -pthread 
> -I/usr/include -Wall -Werror=pointer-arith -Werror=vla -Wextra 
> -Wno-long-long -Wno-declaration-after-statement -Wc++-compat 
> -Wwrite-strings -Wno-use-after-free -DPIC -fPIC toke.c
> toke.c: In function 'Perl_valid_identifier_pve':
> toke.c:13972:1: error: insn does not satisfy its constraints:
> 13972 | }
>        | ^
> (insn 406 405 74 40 (parallel [
>              (set (reg:SI 0 %r0 [112])
>                  (zero_extract:SI (mem/u:SI (reg:SI 0 %r0) [2  S4 A32])
>                      (const_int 8 [0x8])
>                      (const_int 16 [0x10])))
>              (clobber (reg:CC 16 %psl))
>          ]) "toke.c":13945:12 470 {*extzv_aligned_2}
>       (expr_list:REG_UNUSED (reg:CC 16 %psl)
>          (nil)))
> during RTL pass: cprop_hardreg
> toke.c:13972:1: internal compiler error: in extract_constrain_insn, at 
> recog.cc:2698
> no stack trace because unwind library not available
> Please submit a full bug report, with preprocessed source (by using 
> -freport-bug).
> See <http://www.NetBSD.org/support/send-pr.html> for instructions.
> *** Error code 1

What version of GCC is this?

Could you create the preprocessed source together with the source (toke.c)
by passing -save-temps to the GCC command line?

gcc -c -DPERL_CORE -O2 -pthread -I/usr/include -fwrapv \
    -fno-strict-aliasing -pipe -I/usr/local/include -std=c99 -O2 -pthread \
    -I/usr/include -Wall -Werror=pointer-arith -Werror=vla -Wextra \ 
    -Wno-long-long -Wno-declaration-after-statement -Wc++-compat \
    -Wwrite-strings -Wno-use-after-free -DPIC -fPIC toke.c -save-temps

If it's a recent version of GCC, it should be reported to the GCC bug tracker:

https://gcc.gnu.org/bugzilla/

> I can't say I've seen this one before. For whatever reason, it compiled 
> fine with "-O0".

That's not unusual. It's usually one particular optimization that triggers
an internal compiler error. If it doesn't build with -O1 but with -O0, you
can try adding the following optimizations for O1 manually until it fails:

https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html


Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.