https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69887
Bug ID: 69887 Summary: gcc ICE at -O1 and above on x86_64-linux-gnu in mark_jump_label_1 Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: helloqirun at gmail dot com Target Milestone: --- The following code causes an ICE when compiled with the current gcc trunk at -O1 and above on x86_64-linux-gnu in both 32-bit and 64-bit modes. It affects gcc-4.6 to trunk. $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix gcc version 6.0.0 20160220 (experimental) [trunk revision 233587] (GCC) $ gcc-trunk -O1 abc.c abc.c: In function 'main': abc.c:6:1: internal compiler error: in mark_jump_label_1, at jump.c:1159 } ^ 0x9d50a9 mark_jump_label_1 ../../gcc/gcc/jump.c:1159 0x9d4e8a mark_jump_label_1 ../../gcc/gcc/jump.c:1219 0x9d5485 mark_all_labels ../../gcc/gcc/jump.c:313 0x9d5485 rebuild_jump_labels_1 ../../gcc/gcc/jump.c:75 0x11da8c1 rest_of_handle_cse ../../gcc/gcc/cse.c:7538 0x11da8c1 execute ../../gcc/gcc/cse.c:7572 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. $ cat abc.c int a[1]; int main() { __builtin_setjmp(a); __builtin_longjmp(a, 1); return 0; }