http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56921
Bug #: 56921 Summary: [4.8 Regression] ICE in rtx_cost Classification: Unclassified Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: d...@gcc.gnu.org libgomp.c++/for-3.C produces a segfault in GCC. Program received signal SIGSEGV, Segmentation fault. _Z8rtx_costP7rtx_def8rtx_codeib (x=0x70824514, outer_code=270238820, opno=0, speed=true) at /nasfarm/dje/src/src/gcc/rtlanal.c:3802 (gdb) where #0 _Z8rtx_costP7rtx_def8rtx_codeib (x=0x70824514, outer_code=270238820, opno=0, speed=true) at /nasfarm/dje/src/src/gcc/rtlanal.c:3802 #1 0x109f4e98 in _Z21doloop_optimize_loopsv () at /nasfarm/dje/src/src/gcc/loop-doloop.c:2125 #2 0x109d0db8 in _ZL10rtl_doloopv () at /nasfarm/dje/src/src/gcc/loop-init.c:543 #3 0x106370f8 in _Z16execute_one_passP8opt_pass (pass=0x3019aa00) at /nasfarm/dje/src/src/gcc/passes.c:2329 #4 0x10637590 in _Z17execute_pass_listP8opt_pass (pass=0x3019aa00) at /nasfarm/dje/src/src/gcc/passes.c:2380 #5 0x106375a8 in _Z17execute_pass_listP8opt_pass (pass=0x3019ab50) at /nasfarm/dje/src/src/gcc/passes.c:2381 #6 0x106375a8 in _Z17execute_pass_listP8opt_pass (pass=0x301b59c8) at /nasfarm/dje/src/src/gcc/passes.c:2381 #7 0x10545f54 in _ZL15expand_functionP11cgraph_node (node=0x70419dc0) at /nasfarm/dje/src/src/gcc/cgraphunit.c:1640 #8 0x1054821c in _Z7compilev () at /nasfarm/dje/src/src/gcc/cgraphunit.c:3710 #9 0x10548da4 in _Z25finalize_compilation_unitv () at /nasfarm/dje/src/src/gcc/cgraphunit.c:2119 #10 0x107517b8 in _Z28cp_write_global_declarationsv () at /nasfarm/dje/src/src/gcc/cp/decl2.c:4324 #11 0x10000b14 in _ZL12compile_filev () 3797 /* Sum the costs of the sub-rtx's, plus cost of this operation, 3798 which is already in total. */ 3799 3800 fmt = GET_RTX_FORMAT (code); 3801 for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) 3802 if (fmt[i] == 'e') 3803 total += rtx_cost (XEXP (x, i), code, i, speed); 3804 else if (fmt[i] == 'E') 3805 for (j = 0; j < XVECLEN (x, i); j++) 3806 total += rtx_cost (XVECEXP (x, i, j), code, i, speed);