https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94538

--- Comment #3 from Zdenek Sojka <zsojka at seznam dot cz> ---
(In reply to Wilco from comment #2)
> This was introduced by commit e24f6408d so only in GCC10.

Thank you for checking this!

I am quite sure this fails in gcc-9 as well:

$ armv7a-hardfloat-linux-gnueabi-gcc -mcpu=cortex-m23 -mslow-flash-data
testcase.c
testcase.c: In function 'foo':
testcase.c:9:1: error: insn does not satisfy its constraints:
    9 | }
      | ^
(insn 91 90 17 (set (reg:SI 12 ip [125])
        (plus:SI (reg:SI 12 ip [125])
            (const_int 255 [0xff]))) "testcase.c":8:5 812 {*thumb1_addsi3}
     (expr_list:REG_EQUAL (const_int 4095 [0xfff])
        (nil)))
during RTL pass: shorten
testcase.c:9:1: internal compiler error: in extract_constrain_insn_cached, at
recog.c:2223
0x68bade _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /repo/gcc-9-branch/gcc/rtl-error.c:108
0x68bb6b _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /repo/gcc-9-branch/gcc/rtl-error.c:118
0x67c6a2 extract_constrain_insn_cached(rtx_insn*)
        /repo/gcc-9-branch/gcc/recog.c:2223
0x14555b3 insn_default_length(rtx_insn*)
        /repo/gcc-9-branch/gcc/config/arm/arm.md:376
0xbc958e shorten_branches(rtx_insn*)
        /repo/gcc-9-branch/gcc/final.c:1119
0xbc965f rest_of_handle_shorten_branches
        /repo/gcc-9-branch/gcc/final.c:4754
0xbc965f execute
        /repo/gcc-9-branch/gcc/final.c:4783
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ armv7a-hardfloat-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-9-branch/binary-latest-armv7a-hardfloat/bin/armv7a-hardfloat-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-9-branch/binary-9-branch-20200407210206-g14192f1ed48-checking-yes-rtl-df-extra-armv7a-hardfloat/bin/../libexec/gcc/armv7a-hardfloat-linux-gnueabi/9.3.1/lto-wrapper
Target: armv7a-hardfloat-linux-gnueabi
Configured with: /repo/gcc-9-branch//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --with-float=hard --with-fpu=vfpv4
--with-arch=armv7-a --with-sysroot=/usr/armv7a-hardfloat-linux-gnueabi
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=armv7a-hardfloat-linux-gnueabi
--with-ld=/usr/bin/armv7a-hardfloat-linux-gnueabi-ld
--with-as=/usr/bin/armv7a-hardfloat-linux-gnueabi-as --disable-libstdcxx-pch
--prefix=/repo/gcc-9-branch//binary-9-branch-20200407210206-g14192f1ed48-checking-yes-rtl-df-extra-armv7a-hardfloat
Thread model: posix
gcc version 9.3.1 20200407 (GCC) 

Perhaps the offending commit, or part of it, was backported to gcc-9 as well?

Reply via email to