From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 90C2B3858415; Fri, 19 Jan 2024 22:56:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 90C2B3858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705704969; bh=+uuiF4z99i6knh1r5k/OxE/alEQjRu8vdlM4fbEE2AM=; h=From:To:Subject:Date:From; b=G1b+srNwaLbv4VWqn153GOXmzFfev9+YqQIvJ95M9meGZo5OA6YBXXZmjabpAgqTm RykusmFB++So+SDmJl8KhnnN5vyBTJjq5Hz3YnlnYTgpy7yruLBaPGI9MqYc/Ed0th VKDwW+167Qy0XTI4vhLqBQickuUUI2NsI1mRcIZE= From: "thiago.bauermann at linaro dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/113510] New: [ARM Thumb] ICE in extract_constrain_insn with CPU cortex-m23 Date: Fri, 19 Jan 2024 22:56:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thiago.bauermann at linaro dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113510 Bug ID: 113510 Summary: [ARM Thumb] ICE in extract_constrain_insn with CPU cortex-m23 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: thiago.bauermann at linaro dot org Target Milestone: --- Created attachment 57167 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57167&action=3Dedit Preprocessed version of nested-3.c After commit a729b6e002fe ("[PR112918][LRA]: Fixing IRA ICE on m68k"), the following failures started appearing on --target=3Darm-none-eabi --with-mode=3Dthumb --with-cpu=3Dcortex-m23: =3D=3D=3D gcc tests =3D=3D=3D Running gcc:gcc.c-torture/compile/compile.exp ... FAIL: gcc.c-torture/compile/nested-3.c -O2 (internal compiler error: in extract_constrain_insn, at recog.cc:2713) FAIL: gcc.c-torture/compile/nested-3.c -O2 (test for excess errors) FAIL: gcc.c-torture/compile/nested-3.c -O2 -flto -fno-use-linker-plugin -flto-partition=3Dnone (internal compiler error: in extract_constrain_insn= , at recog.cc:2713) FAIL: gcc.c-torture/compile/nested-3.c -O2 -flto -fno-use-linker-plugin -flto-partition=3Dnone (test for excess errors) FAIL: gcc.c-torture/compile/nested-3.c -O3 -g (internal compiler error: in extract_constrain_insn, at recog.cc:2713) FAIL: gcc.c-torture/compile/nested-3.c -O3 -g (test for excess errors) FAIL: gcc.c-torture/compile/nested-3.c -Os (internal compiler error: in extract_constrain_insn, at recog.cc:2713) FAIL: gcc.c-torture/compile/nested-3.c -Os (test for excess errors) Running gcc:gcc.c-torture/execute/execute.exp ... FAIL: gcc.c-torture/execute/pr71494.c -O2 (internal compiler error: in extract_constrain_insn, at recog.cc:2713) FAIL: gcc.c-torture/execute/pr71494.c -O2 (test for excess errors) UNRESOLVED: gcc.c-torture/execute/pr71494.c -O2 compilation failed to prod= uce executable FAIL: gcc.c-torture/execute/pr71494.c -O2 -flto -fno-use-linker-plugin -flto-partition=3Dnone (internal compiler error: in extract_constrain_insn= , at recog.cc:2713) FAIL: gcc.c-torture/execute/pr71494.c -O2 -flto -fno-use-linker-plugin -flto-partition=3Dnone (test for excess errors) UNRESOLVED: gcc.c-torture/execute/pr71494.c -O2 -flto -fno-use-linker-plugin -flto-partition=3Dnone compilation failed to produce executable FAIL: gcc.c-torture/execute/pr71494.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (internal compiler error: in extract_constrain_insn, = at recog.cc:2713) FAIL: gcc.c-torture/execute/pr71494.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (test for excess errors) UNRESOLVED: gcc.c-torture/execute/pr71494.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects compilation failed to produce executable FAIL: gcc.c-torture/execute/pr71494.c -O3 -g (internal compiler error: in extract_constrain_insn, at recog.cc:2713) FAIL: gcc.c-torture/execute/pr71494.c -O3 -g (test for excess errors) UNRESOLVED: gcc.c-torture/execute/pr71494.c -O3 -g compilation failed to produce executable FAIL: gcc.c-torture/execute/pr71494.c -Os (internal compiler error: in extract_constrain_insn, at recog.cc:2713) FAIL: gcc.c-torture/execute/pr71494.c -Os (test for excess errors) UNRESOLVED: gcc.c-torture/execute/pr71494.c -Os compilation failed to prod= uce executable I tested on today's trunk (commit 07b392550f37) and the failures are still present. I'm attaching the gcc.{sum,log} files, and also the .i file that causes the ICE. Here's how to reproduce on an x86_64-linux machine: 1. First, create a combined tree: $ mkdir /tmp/combined-tree-src /tmp/combined-tree-build $ cd ~/src/newlib-cygwin && find . -print | cpio -pdlm /tmp/combined-tree-s= rc $ cd ~/src/binutils-gdb && find . -print | cpio -pdlmu /tmp/combined-tree-s= rc $ cd ~/src/gcc && find . -print | cpio -pdlmu /tmp/combined-tree-src 2. Then build and install the cross GCC: $ cd /tmp/combined-tree-build $ /tmp/combined-tree-src/configure \ SHELL=3D/bin/bash \ --with-gnu-as \ --with-gnu-ld \ --disable-libmudflap \ --enable-lto \ --enable-shared \ --without-included-gettext \ --enable-nls \ --with-system-zlib \ --disable-sjlj-exceptions \ --enable-gnu-unique-object \ --enable-linker-build-id \ --disable-libstdcxx-pch \ --enable-c99 \ --enable-clocale=3Dgnu \ --enable-libstdcxx-debug \ --enable-long-long \ --with-cloog=3Dno \ --with-ppl=3Dno \ --with-isl=3Dno \ --enable-threads=3Dno \ --disable-multiarch \ --disable-multilib \ --with-mode=3Dthumb \ --with-cpu=3Dcortex-m23 \ --with-float=3Dsoft \ --with-newlib \ --with-headers=3Dyes \ --with-native-system-header-dir=3D/include \ --enable-checking=3Dyes \ --disable-bootstrap \ --enable-languages=3Dc,lto \ --prefix=3D/tmp/arm-none-eabi \ --build=3Dx86_64-pc-linux-gnu \ --host=3Dx86_64-pc-linux-gnu \ --disable-source-highlight \ --target=3Darm-none-eabi \ && exec make \ SHELL=3D/bin/bash \ -w \ -j $(nproc) \ LDFLAGS_FOR_TARGET=3D"--specs=3Drdimon.specs" \ CFLAGS_FOR_BUILD=3D"-pipe -g -O2" \ CXXFLAGS_FOR_BUILD=3D"-pipe -g -O2" \ LDFLAGS_FOR_BUILD=3D"-static-libgcc" \ MAKEINFOFLAGS=3D--force \ BUILD_INFO=3D"" \ MAKEINFO=3Decho \ && make install 3. Finally, use it to compile the problematic .c files: $ /tmp/arm-none-eabi/bin/arm-none-eabi-gcc -fdiagnostics-plain-output -O2 -= w -c -o nested-3.o /tmp/combined-tree-src/gcc/testsuite/gcc.c-torture/compile/nested-3.c /tmp/combined-tree-src/gcc/testsuite/gcc.c-torture/compile/nested-3.c: In function =E2=80=98f=E2=80=99: /tmp/combined-tree-src/gcc/testsuite/gcc.c-torture/compile/nested-3.c:18:1: error: insn does not satisfy its constraints: (insn 39 13 16 2 (set (reg:SI 12 ip [127]) (plus:SI (reg/f:SI 13 sp) (const_int 8 [0x8]))) "/tmp/combined-tree-src/gcc/testsuite/gcc.c-torture/compile/nested-3.c":17:= 10 935 {*thumb1_addsi3} (nil)) during RTL pass: cprop_hardreg /tmp/combined-tree-src/gcc/testsuite/gcc.c-torture/compile/nested-3.c:18:1: internal compiler error: in extract_constrain_insn, at recog.cc:2713 0x744632 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../combined-tree/gcc/rtl-error.cc:108 0x74465e _fatal_insn_not_found(rtx_def const*, char const*, int, char const= *) ../../combined-tree/gcc/rtl-error.cc:118 0x7430fb extract_constrain_insn(rtx_insn*) ../../combined-tree/gcc/recog.cc:2713 0xef7636 copyprop_hardreg_forward_1 ../../combined-tree/gcc/regcprop.cc:836 0xef8784 execute ../../combined-tree/gcc/regcprop.cc:1423 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. $ /tmp/arm-none-eabi/bin/arm-none-eabi-gcc /tmp/combined-tree-src/gcc/testsuite/gcc.c-torture/execute/pr71494.c -fdiagnostics-plain-output -O2 -w -B/tmp/combined-tree-build/arm-none-eabi/./libgloss/arm/ -L/tmp/combined-tree-build/arm-none-eabi/./libgloss/arm -L/tmp/combined-tree-src/libgloss/arm -L/tmp/combined-tree-build/ld -B/tmp/combined-tree-build/arm-none-eabi/./newlib/ -L/tmp/combined-tree-build/arm-none-eabi/./newlib -specs=3Drdimon.specs -lm= -o ./pr71494.exe /tmp/combined-tree-src/gcc/testsuite/gcc.c-torture/execute/pr71494.c: In function =E2=80=98main=E2=80=99: /tmp/combined-tree-src/gcc/testsuite/gcc.c-torture/execute/pr71494.c:23:1: error: insn does not satisfy its constraints: (insn 64 9 12 2 (set (reg:SI 12 ip [123]) (plus:SI (reg/f:SI 13 sp) (const_int 4 [0x4]))) "/tmp/combined-tree-src/gcc/testsuite/gcc.c-torture/execute/pr71494.c":19:3= 935 {*thumb1_addsi3} (nil)) during RTL pass: cprop_hardreg /tmp/combined-tree-src/gcc/testsuite/gcc.c-torture/execute/pr71494.c:23:1: internal compiler error: in extract_constrain_insn, at recog.cc:2713 0x744632 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../combined-tree/gcc/rtl-error.cc:108 0x74465e _fatal_insn_not_found(rtx_def const*, char const*, int, char const= *) ../../combined-tree/gcc/rtl-error.cc:118 0x7430fb extract_constrain_insn(rtx_insn*) ../../combined-tree/gcc/recog.cc:2713 0xef7636 copyprop_hardreg_forward_1 ../../combined-tree/gcc/regcprop.cc:836 0xef8784 execute ../../combined-tree/gcc/regcprop.cc:1423 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions.=