With versions r8+ and file ./gcc.target/i386/pr55512-4.c : $ gcc-12-20220206 -c pr55512-4.c -O2 -pg -fchecking during RTL pass: reload pr55512-4.c: In function 'bar': pr55512-4.c:14:1: internal compiler error: maximum number of LRA assignment passes is achieved (30) 14 | } | ^ 0xa93650 lra_assign(bool&) ../../gcc/lra-assigns.cc:1694 0xa8e73c lra(_IO_FILE*) ../../gcc/lra.cc:2395 0xa473f9 do_reload ../../gcc/ira.cc:5940 0xa473f9 execute ../../gcc/ira.cc:6126
Confirmed. note The ICE changed in GCC 11 from: <source>:3:3: error: 'asm' operand has impossible constraints 3 | asm goto ("" : : "r" (x), "r" (x + 1), "r" (x + 2), "r" (x + 3), /* { dg-error "operand has impossible constraints" } */ | ^~~ <source>:3:3: error: 'asm' operand has impossible constraints <source>:10:1: error: in basic block 2: 10 | } | ^ <source>:10:1: error: in basic block 2: } ^ <source>:10:1: error: flow control insn inside a basic block (jump_insn 23 77 75 2 (parallel [ (asm_operands/v ("") ("") 0 [] [] [ (label_ref:DI 24) ] <source>:3) (clobber (reg:CCFP 18 fpsr)) (clobber (reg:CC 17 flags)) ]) "<source>":3 -1 (nil) -> 24) To: <source>:10:1: internal compiler error: maximum number of LRA assignment passes is achieved (30) So it would be useful to get the bisects at the point of change and also when it originally broke.
w/o -pg, there's an error output as expected: ../gcc.target/i386/pr55512-4.c:7:3: error: ‘asm’ operand has impossible constraints 7 | asm goto ("" : : "r" (x), "r" (x + 1), "r" (x + 2), "r" (x + 3), /* { dg-error "operand has impossible constraints" } */ It looks like an diagnostic issue?
Before r8-7279-g6027ea4cd7b1e955cf7cd61e9178a89d89e3dbe2 we emitted just the 2 'asm' operand has impossible constraints errors and nothing more, since r8-7279 we ICE after those. And starting with r11-5002-ge3b3b59683c1e7d31a9d313dd97394abebf644be it is sometimes internal compiler error: in lra_assign, at lra-assigns.c:1648 and sometimes internal compiler error: maximum number of LRA assignment passes is achieved (30) (which one changes pretty often over the revisions).
The master branch has been updated by Vladimir Makarov <vmakarov@gcc.gnu.org>: https://gcc.gnu.org/g:db69f666a728ce800a840115829f6b64bc3174d2 commit r12-7278-gdb69f666a728ce800a840115829f6b64bc3174d2 Author: Vladimir N. Makarov <vmakarov@redhat.com> Date: Thu Feb 17 11:31:50 2022 -0500 [PR104447] LRA: Do not split non-alloc hard regs. LRA tried to split non-allocated hard reg for reload pseudos again and again until number of assignment passes reaches the limit. The patch fixes this. gcc/ChangeLog: PR rtl-optimization/104447 * lra-constraints.cc (spill_hard_reg_in_range): Initiate ignore hard reg set by lra_no_alloc_regs. gcc/testsuite/ChangeLog: PR rtl-optimization/104447 * gcc.target/i386/pr104447.c: New.
GCC 9 branch is being closed
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
GCC 10 branch is being closed.
Fixed back in the gcc-12 era. Adjusting regression markers.