------- Comment #7 from pinskia at gcc dot gnu dot org 2009-09-20 21:11 ------- sorry for not adding a backtrace: #2 0x0000000000b86862 in tree_int_cst_lt (t1=0x7ffff6fc6990, t2=0x7ffff6fcc040) at /home/pinskia/src/local/gcc/gcc/tree.c:6087 #3 0x0000000000710ea0 in optimize_minmax_comparison (loc=482, code=GT_EXPR, type=0x7ffff7ed8540, op0=0x7ffff7ff8c80, op1=0x7ffff6fcc040) at /home/pinskia/src/local/gcc/gcc/fold-const.c:6150 #4 0x000000000072e64c in fold_comparison (loc=482, code=GT_EXPR, type=0x7ffff7ed8540, op0=0x7ffff7ff8c80, op1=0x7ffff6fcc040) at /home/pinskia/src/local/gcc/gcc/fold-const.c:9616 #5 0x000000000076ba81 in fold_binary_loc (loc=482, code=GT_EXPR, type=0x7ffff7ed8540, op0=0x7ffff7ff8c80, op1=0x7ffff6fcc040) at /home/pinskia/src/local/gcc/gcc/fold-const.c:13105 #6 0x000000000077752a in fold_build2_stat_loc (loc=482, code=GT_EXPR, type=0x7ffff7ed8540, op0=0x7ffff7ff8c80, op1=0x7ffff6fcc040) at /home/pinskia/src/local/gcc/gcc/fold-const.c:14374 #7 0x0000000000728e28 in fold_comparison (loc=482, code=LT_EXPR, type=0x7ffff7ed8540, op0=0x7ffff6fcc040, op1=0x7ffff7ff8c80) at /home/pinskia/src/local/gcc/gcc/fold-const.c:9159 #8 0x000000000076ba81 in fold_binary_loc (loc=482, code=LT_EXPR, type=0x7ffff7ed8540, op0=0x7ffff6fcc040, op1=0x7ffff7ff8c80) at /home/pinskia/src/local/gcc/gcc/fold-const.c:13105 #9 0x000000000077752a in fold_build2_stat_loc (loc=482, code=LT_EXPR, type=0x7ffff7ed8540, op0=0x7ffff6fcc040, op1=0x7ffff7ff8c80) at /home/pinskia/src/local/gcc/gcc/fold-const.c:14374 #10 0x00000000004fd2a6 in c_fully_fold_internal (expr=0x7ffff6fcc000, in_init=0 '\0', maybe_const_operands=0x7fffffffe0af "", maybe_const_itself=0x7fffffffe0ae "\001") at /home/pinskia/src/local/gcc/gcc/c-common.c:1308 #11 0x00000000004fbf28 in c_fully_fold (expr=0x7ffff6fcc000, in_init=0 '\0', maybe_const=0x7fffffffe0af "") at /home/pinskia/src/local/gcc/gcc/c-common.c:1108 #12 0x00000000004eee23 in c_finish_return (loc=460, retval=0x7ffff6fcc000, origtype=0x0) at /home/pinskia/src/local/gcc/gcc/c-typeck.c:8078
The op0 of the call to fold_build2_stat_loc is not fully folded which causes the ICE. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41182