https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128254
Bug ID: 128254
Summary: ICE at O2: in extract_constrain_insn, at recog.cc:2797
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: bic60176 at gmail dot com
Target Milestone: ---
Created attachment 66013
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=66013&action=edit
testcase
Compiler Explorer: https://godbolt.org/z/sefbaMETa
Console:
<source>:3:1: warning: conflicting types for built-in function 'memmove';
expected 'void *(void *, const void *, long unsigned int)'
[-Wbuiltin-declaration-mismatch]
3 | memmove (void *__dest, __const void *__src, size_t __n)
| ^~~~~~~
<source>:1:1: note: 'memmove' is declared in header '<string.h>'
+++ |+#include <string.h>
1 | #define size_t int
<source>: In function 'memmove':
<source>:28:1: error: unrecognizable insn:
28 | }
| ^
(insn 17 65 52 3 (parallel [
(set (reg:DI 2 cx [orig:114 __d0 ] [114])
(asm_operands/v:DI ("cld
rep
movsb") ("=&c") 0 [
(reg:SI 2 cx [orig:114 __d0 ] [114])
(reg:DI 4 si [orig:115 __d1 ] [115])
(reg:DI 5 di [orig:116 __d2 ] [116])
]
[
(asm_input:SI ("0") <source>:10)
(asm_input:DI ("1") <source>:10)
(asm_input:DI ("2vL0Bdc") <source>:10)
]
[] <source>:10))
(set (reg:DI 4 si [orig:115 __d1 ] [115])
(asm_operands/v:DI ("cld
rep
movsb") ("=&S") 1 [
(reg:SI 2 cx [orig:114 __d0 ] [114])
(reg:DI 4 si [orig:115 __d1 ] [115])
(reg:DI 5 di [orig:116 __d2 ] [116])
]
[
(asm_input:SI ("0") <source>:10)
(asm_input:DI ("1") <source>:10)
(asm_input:DI ("2vL0Bdc") <source>:10)
]
[] <source>:10))
(set (reg:DI 5 di [orig:116 __d2 ] [116])
(asm_operands/v:DI ("cld
rep
movsb") ("=&D") 2 [
(reg:SI 2 cx [orig:114 __d0 ] [114])
(reg:DI 4 si [orig:115 __d1 ] [115])
(reg:DI 5 di [orig:116 __d2 ] [116])
]
[
(asm_input:SI ("0") <source>:10)
(asm_input:DI ("1") <source>:10)
(asm_input:DI ("2vL0Bdc") <source>:10)
]
[] <source>:10))
(clobber (mem:BLK (scratch) [0 A8]))
(clobber (reg:CC 17 flags))
]) "<source>":10:5 -1
(nil))
during RTL pass: reload
<source>:28:1: internal compiler error: in extract_constrain_insn, at
recog.cc:2797
0x2912368 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x2906fab internal_error(char const*, ...)
???:0
0xa9f008 fancy_abort(char const*, int, char const*)
???:0
0x8c55a1 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
???:0
0x8c55c3 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
???:0
0x1058c3f lra(_IO_FILE*, int)
???:0
/cefs/7f/7fa6d45b591391d387e52988_gcc-trunk-20261028/bin/../libexec/gcc/x86_64-linux-gnu/17.0.0/cc1
-quiet -imultiarch x86_64-linux-gnu -iprefix
/cefs/7f/7fa6d45b591391d387e52988_gcc-trunk-20261028/bin/../lib/gcc/x86_64-linux-gnu/17.0.0/
<source> -quiet -dumpdir /app/ -dumpbase output.c -dumpbase-ext .c -masm=intel
-mtune=generic -march=x86-64 -g -O2 -fdiagnostics-color=always -fno-verbose-asm
-o /app/output.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1