https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127800
Bug ID: 127800
Summary: ICE when calling __builtin_aarch64_crc32b without the
target attribute
Product: gcc
Version: 16.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: antoyo at gcc dot gnu.org
Target Milestone: ---
Created attachment 65794
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65794&action=edit
Reproducer for the bug
Hi.
Compile the reproducer with `gcc main.c -c` and you get:
main.c: In function âfâ:
main.c:5:1: error: unrecognizable insn:
5 | }
| ^
(insn 9 8 12 2 (set (reg:SI 101 [ _3 ])
(unspec:SI [
(reg:SI 103)
(reg:QI 104)
] UNSPEC_CRC32B)) "main.c":4:10 -1
(nil))
during RTL pass: vregs
main.c:5:1: internal compiler error: in extract_insn, at recog.cc:2894
0x2055cef internal_error(char const*, ...)
../../../gcc/gcc/diagnostic-global-context.cc:788
0x7deecf fancy_abort(char const*, int, char const*)
../../../gcc/gcc/diagnostics/context.cc:1817
0x7dcd9f _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../../gcc/gcc/rtl-error.cc:108
0x7dcdd3 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../../gcc/gcc/rtl-error.cc:116
0xde6cc3 extract_insn(rtx_insn*)
../../../gcc/gcc/recog.cc:2894
0xad9ac7 instantiate_virtual_regs_in_insn
../../../gcc/gcc/function.cc:1611
0xad9ac7 instantiate_virtual_regs
../../../gcc/gcc/function.cc:1987
0xad9ac7 execute
../../../gcc/gcc/function.cc:2034
Adding `__attribute__ ((target ("+crc")))` make this compiles.
Thanks.