https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117354
Bug ID: 117354 Summary: [14] ICE: in extract_bit_field_1, at expmed.cc:1838 Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bic60176 at gmail dot com Target Milestone: --- Created attachment 59491 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59491&action=edit preprocessed source file We found that a case caused ICE on Ubuntu 22.04.3 LTS. We used spack to install gcc-14.2.0, so we are not very sure if crash is caused by gcc. Compiler flags: -O3 -flto -march=native -fno-omit-frame-pointer -fstack-protector-strong -fsanitize=undefined -fsanitize=address Flags (activated by -march=native): $ gcc -march=native -E -v - </dev/null 2>&1 | grep cc1 /home/user/spack/opt/spack/linux-ubuntu22.04-zen4/gcc-11.4.0/gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/libexec/gcc/x86_64-pc-linux-gnu/14.2.0/cc1 -E -quiet -v -imultiarch x86_64-linux-gnu - -march=znver4 -mmmx -mpopcnt -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -msse4a -mno-fma4 -mno-xop -mfma -mavx512f -mbmi -mbmi2 -maes -mpclmul -mavx512vl -mavx512bw -mavx512dq -mavx512cd -mavx512vbmi -mavx512ifma -mavx512vpopcntdq -mavx512vbmi2 -mgfni -mvpclmulqdq -mavx512vnni -mavx512bitalg -mavx512bf16 -mno-avx512vp2intersect -mno-3dnow -madx -mabm -mno-cldemote -mclflushopt -mclwb -mclzero -mcx16 -mno-enqcmd -mf16c -mfsgsbase -mfxsr -mno-hle -msahf -mno-lwp -mlzcnt -mmovbe -mno-movdir64b -mno-movdiri -mmwaitx -mno-pconfig -mpku -mprfchw -mno-ptwrite -mrdpid -mrdrnd -mrdseed -mno-rtm -mno-serialize -mno-sgx -msha -mshstk -mno-tbm -mno-tsxldtrk -mvaes -mno-waitpkg -mwbnoinvd -mxsave -mxsavec -mxsaveopt -mxsaves -mno-amx-tile -mno-amx-int8 -mno-amx-bf16 -mno-uintr -mno-hreset -mno-kl -mno-widekl -mno-avxvnni -mno-avx512fp16 -mno-avxifma -mno-avxvnniint8 -mno-avxneconvert -mno-cmpccxadd -mno-amx-fp16 -mno-prefetchi -mno-raoint -mno-amx-complex -mno-avxvnniint16 -mno-sm3 -mno-sha512 -mno-sm4 -mno-apxf -mno-usermsr --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=znver4 -dumpbase - Console: during RTL pass: expand example.c: In function 'main': example.c:29:3: internal compiler error: in extract_bit_field_1, at expmed.cc:1838 29 | printf("New value of x after call to baz(): %llu\n", *(_BitInt(512) *) ptr); | ^ 0x6eb5ae extract_bit_field_1 /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/expmed.cc:1838 0x8ac8cc extract_bit_field(rtx_def*, poly_int<1u, unsigned long>, poly_int<1u, unsigned long>, int, rtx_def*, machine_mode, machine_mode, bool, rtx_def**) /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/expmed.cc:2151 0x8c019c expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/expr.cc:12468 0x8d58bd expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/expr.cc:9451 0x8d58bd expand_expr_real_gassign(gassign*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/expr.cc:11111 0x8bf9cc expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/expr.cc:11288 0x7a466c expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier) /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/expr.h:316 0x7a466c store_one_arg /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/calls.cc:5029 0x7a666a expand_call(tree_node*, rtx_def*, int) /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/calls.cc:3518 0x8be3e9 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/expr.cc:12361 0x7b6996 expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier) /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/expr.h:316 0x7b6996 expand_call_stmt /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/cfgexpand.cc:2865 0x7b6996 expand_gimple_stmt_1 /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/cfgexpand.cc:3932 0x7b6996 expand_gimple_stmt /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/cfgexpand.cc:4077 0x7bb717 expand_gimple_basic_block /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/cfgexpand.cc:6133 0x7bd6d6 execute /tmp/user/spack-stage/spack-stage-gcc-14.2.0-apgye4ve4dtlq4rd2voedsw5kulgepjh/spack-src/gcc/cfgexpand.cc:6872 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See <https://github.com/spack/spack/issues> for instructions. lto-wrapper: fatal error: gcc returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status