http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49963
Summary: ICE: in abs_hwi, at hwint.c:108 Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: g...@gcc.gnu.org Host: x86-linux-gnu Target: avr Build: x86-linux-gnu Observed this ICE in the test suite for 4.7 trunk r177267 after upgrading from 177070: gcc.c-torture/execute/divconst-2.c: In function 'std_eqn': gcc.c-torture/execute/divconst-2.c:20:3: internal compiler error: in abs_hwi, at hwint.c:108 FAIL: gcc.c-torture/execute/divconst-2.c compilation, -O0 (internal compiler error) FAIL: gcc.c-torture/execute/divconst-2.c compilation, -O1 (internal compiler error) FAIL: gcc.c-torture/execute/divconst-2.c compilation, -O2 (internal compiler error) ... == configure ======================================================== Target: avr Configured with: ../../gcc.gnu.org/trunk/configure --target=avr --prefix=/local/gnu/install/gcc-4.7 --disable-nls --disable-shared --enable-languages=c,c++ --with-dwarf2 --disable-lto Thread model: single gcc version 4.7.0 20110803 (experimental) (GCC) GNU C (GCC) version 4.7.0 20110803 (experimental) (avr) compiled by GNU C version 4.3.2 [gcc-4_3-branch revision 141291], GMP version 5.0.1, MPFR version 3.0.0-p8, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 == hwint.c:abs_hwi() ================================================ hwint.c:abs_hwi() reads /* Compute the absolute value of X. */ HOST_WIDE_INT abs_hwi (HOST_WIDE_INT x) { gcc_checking_assert (x != HOST_WIDE_INT_MIN); return x >= 0 ? x : -x; } == Backtrace ========================================================= #0 fancy_abort (file=0x8890660 "../../../gcc.gnu.org/trunk/gcc/hwint.c", line=108, function=0x889069b "abs_hwi") at ../../../gcc.gnu.org/trunk/gcc/diagnostic.c:893 #1 0x08395087 in abs_hwi (x=-2147483648) at ../../../gcc.gnu.org/trunk/gcc/hwint.c:108 #2 0x08306e8a in fold_plusminus_mult_expr (loc=2983, code=PLUS_EXPR, type=0xb7d5d420, arg0=0xb7dcdcb0, arg1=0xb7dce24c) at ../../../gcc.gnu.org/trunk/gcc/fold-const.c:7040 #3 0x082bbef6 in fold_binary_loc (loc=2983, code=PLUS_EXPR, type=0xb7d5d420, op0=0xb7dcdcb0, op1=0xb7dce24c) at ../../../gcc.gnu.org/trunk/gcc/fold-const.c:9685 #4 0x083174d5 in fold (expr=0xb7dcdccc) at ../../../gcc.gnu.org/trunk/gcc/fold-const.c:13666 #5 0x0813c46c in c_fully_fold_internal (expr=0xb7dcdccc, in_init=0 '\0', maybe_const_operands=0xbfffdf4b "\001\030", maybe_const_itself=0xbfffde6a "\001\001ÌÜÜ· ÔÕ·") at ../../../gcc.gnu.org/trunk/gcc/c-family/c-common.c:1238 #6 0x0813d19b in c_fully_fold (expr=0xb7dcdccc, in_init=212 'Ô', maybe_const=0xbfffdf4b "\001\030") at ../../../gcc.gnu.org/trunk/gcc/c-family/c-common.c:1029 #7 0x080eadcb in build_binary_op (location=2989, code=EQ_EXPR, orig_op0=0xb7dcdccc, orig_op1=0xb7dce150, convert_p=1) at ../../../gcc.gnu.org/trunk/gcc/c-typeck.c:10172 #8 0x080ef279 in parser_build_binary_op (location=2989, code=EQ_EXPR, arg1={value = 0xb7dcdccc, original_code = PLUS_EXPR, original_type = 0x0}, arg2={value = 0xb7dce150, original_code = ERROR_MARK, original_type = 0xb7d5d420}) at ../../../gcc.gnu.org/trunk/gcc/c-typeck.c:3218 #9 0x080fbe57 in c_parser_binary_expression (parser=0xb7dcda9c, after=<value optimized out>, prec=PREC_NONE) at ../../../gcc.gnu.org/trunk/gcc/c-parser.c:5663 #10 0x080fc49f in c_parser_conditional_expression (parser=0xb7dcda9c, after=0x80000000) at ../../../gcc.gnu.org/trunk/gcc/c-parser.c:5330 #11 0x080fc9c8 in c_parser_expr_no_commas (parser=0xb7dcda9c, after=0x80000000) at ../../../gcc.gnu.org/trunk/gcc/c-parser.c:5250 #12 0x080fce68 in c_parser_expression (parser=0xb7d97dd4) at ../../../gcc.gnu.org/trunk/gcc/c-parser.c:6716 #13 0x080fe5f3 in c_parser_expression_conv (parser=0xb7dcda9c) at ../../../gcc.gnu.org/trunk/gcc/c-parser.c:6747 #14 0x080f887a in c_parser_statement_after_labels (parser=0xb7dcda9c) at ../../../gcc.gnu.org/trunk/gcc/c-parser.c:4416 #15 0x080f997a in c_parser_compound_statement_nostart (parser=0xb7dcda9c) at ../../../gcc.gnu.org/trunk/gcc/c-parser.c:4147 #16 0x08107852 in c_parser_compound_statement (parser=0xb7dcda9c) at ../../../gcc.gnu.org/trunk/gcc/c-parser.c:3984 #17 0x080f7fc3 in c_parser_declaration_or_fndef (parser=0xb7dcda9c, fndef_ok=1 '\001', static_assert_ok=<value optimized out>, empty_ok=1 '\001', nested=0 '\0', start_attr_ok=<value optimized out>, objc_foreach_object_declaration=0x0) at ../../../gcc.gnu.org/trunk/gcc/c-parser.c:1749 #18 0x081081da in c_parser_external_declaration (parser=0xb7dcda9c) at ../../../gcc.gnu.org/trunk/gcc/c-parser.c:1354 #19 0x08108a1b in c_parse_file () at ../../../gcc.gnu.org/trunk/gcc/c-parser.c:1242 #20 0x081501b5 in c_common_parse_file () at ../../../gcc.gnu.org/trunk/gcc/c-family/c-opts.c:1094 #21 0x084b0ecf in toplev_main (argc=12, argv=0xbfffe5e4) at ../../../gcc.gnu.org/trunk/gcc/toplev.c:548 #22 0x08169932 in main (argc=Cannot access memory at address 0x80000000 ) at ../../../gcc.gnu.org/trunk/gcc/main.c:36 (gdb)