https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84123
Bug ID: 84123 Summary: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:908, alpha linux. Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: mcree at orcon dot net.nz Target Milestone: --- Target: alpha Created attachment 43286 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43286&action=edit Preprocessed source The attached preprocessed source (modified from the libcgns project) leads to an ICE at optimisation level -O2 but compiles fine at -O1 or -O0. I have trimmed the source substantially from its original but trimming it further loses the ICE. ICE seen with Debian alpha-linux-gnu-gcc version 7.3.0-1 and also with gcc recently compiled from the trunk (8.0.1 20180129). alpha-linux-gnu-gcc -O2 -c test-preprocessed.c /home/mjc/debian/libcgns/libcgns-3.3.0/src/adf/test.c: In function ‘ADFI_ID_2_file_block_offset.part.0’: /home/mjc/debian/libcgns/libcgns-3.3.0/src/adf/test.c:619:1: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:908 Recent gcc prints out more information: ./toolchain/gcc-install/bin/gcc -mcpu=ev4 -O2 -c test-preprocessed.c during RTL pass: combine /home/mjc/debian/libcgns/libcgns-3.3.0/src/adf/test.c: In function ‘ADFI_ID_2_file_block_offset.part.0’: /home/mjc/debian/libcgns/libcgns-3.3.0/src/adf/test.c:619:1: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:1010 0x12041b91f gen_rtx_SUBREG(machine_mode, rtx_def*, poly_int<1u, unsigned long>) ../../gcc.git/gcc/emit-rtl.c:1010 0x120f7057f change_zero_ext ../../gcc.git/gcc/combine.c:11496 0x120f7087f recog_for_combine ../../gcc.git/gcc/combine.c:11596 0x120f86d43 try_combine ../../gcc.git/gcc/combine.c:3595 0x120f8abcf combine_instructions ../../gcc.git/gcc/combine.c:1320 0x120f8abcf rest_of_handle_combine ../../gcc.git/gcc/combine.c:14856 0x120f8abcf execute ../../gcc.git/gcc/combine.c:14901