------- Comment #1 from rguenth at gcc dot gnu dot org 2006-10-21 12:12 ------- Confirmed. Works with 4.2.
We endlessly fold #5 0x08206aa1 in fold_unary (code=NEGATE_EXPR, type=0xb7c5c284, op0=0xb7cd3258) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:6876 #6 0x08212e3e in fold_build1_stat (code=NEGATE_EXPR, type=0xb7c5c284, op0=0xb7cd3258) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:10475 #7 0x081f8a05 in negate_expr (t=0xb7cd3258) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:1167 #8 0x08206aa1 in fold_unary (code=NEGATE_EXPR, type=0xb7c5c284, op0=0xb7cd3258) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:6876 #9 0x08212e3e in fold_build1_stat (code=NEGATE_EXPR, type=0xb7c5c284, op0=0xb7cd3258) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:10475 #10 0x081f8a05 in negate_expr (t=0xb7cd3258) ... #28 0x081f8a05 in negate_expr (t=0xb7cd3258) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:1167 1167 tree temp = fold_convert (ntype, TREE_OPERAND (t, 0)); (gdb) call debug_generic_expr (t) -07fffffff which has overflowed. #29 0x08206aa1 in fold_unary (code=NEGATE_EXPR, type=0xb7c5c284, op0=0xb7cd3258) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:6876 #30 0x08212e3e in fold_build1_stat (code=NEGATE_EXPR, type=0xb7c5c284, op0=0xb7cd3258) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:10475 #31 0x081f8a05 in negate_expr (t=0xb7cd3258) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:1167 #32 0x0820cb87 in fold_binary (code=CEIL_DIV_EXPR, type=0xb7c5c284, op0=0xb7cd3258, op1=0xb7c4da50) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:8420 #33 0x08212e8e in fold_build2_stat (code=CEIL_DIV_EXPR, type=0xb7c5c284, op0=0xb7cd3258, op1=0xb7c4da50) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:10521 #34 0x080fe243 in infer_loop_bounds_from_undefined (loop=0x86a5310) #32 0x0820cb87 in fold_binary (code=CEIL_DIV_EXPR, type=0xb7c5c284, op0=0xb7cd3258, op1=0xb7c4da50) at /home/richard/src/gcc-4_1-branch/gcc/fold-const.c:8420 8420 case ROUND_DIV_EXPR: (gdb) call debug_generic_expr (op0) -07fffffff (gdb) call debug_generic_expr (op1) -1 -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu dot | |org, rakdver at gcc dot gnu | |dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |ice-on-valid-code Known to fail| |4.1.2 Known to work| |4.0.3 4.2.0 Last reconfirmed|0000-00-00 00:00:00 |2006-10-21 12:12:55 date| | Summary|ICE in "gcc -O -ftrapv" with|[4.1 Regression] ICE in "gcc |decreasing array index |-O -ftrapv" with decreasing | |array index http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29534