------- Comment #8 from bergner at gcc dot gnu dot org 2010-07-08 21:50 ------- The test case that was added to the testsuite (pr30338.c) ICE's on powerpc64-linux with the following options: -Os -m64
Looking at a backtrace, we're hitting this assert in tree.c:build2_stat(): if (code == POINTER_PLUS_EXPR && arg0 && arg1 && tt) gcc_assert (POINTER_TYPE_P (tt) && POINTER_TYPE_P (TREE_TYPE (arg0)) && INTEGRAL_TYPE_P (TREE_TYPE (arg1)) && useless_type_conversion_p (sizetype, TREE_TYPE (arg1))); gdb shows this: (gdb) frame 1 #1 0x000000001066de84 in build2_stat (code=POINTER_PLUS_EXPR, tt=0x40000410000, arg0=0x400005112e8, arg1=0x400003104b0) at /home/bergner/gcc/gcc-mainline-r161924/gcc/tree.c:3715 3715 gcc_assert (POINTER_TYPE_P (tt) && POINTER_TYPE_P (TREE_TYPE (arg0)) (gdb) call debug_tree(tt) <integer_type 0x40000410000 long unsigned int public unsigned sizetype DI size <integer_cst 0x40000310780 type <integer_type 0x400004100a8 bit_size_type> constant 64> unit size <integer_cst 0x400003107a8 type <integer_type 0x40000410000 long unsigned int> constant 8> align 64 symtab 0 alias set -1 canonical type 0x40000410000 precision 64 min <integer_cst 0x400003107d0 0> max <integer_cst 0x40000310aa0 -1>> (gdb) call debug_tree(arg0) <ssa_name 0x400005112e8 type <integer_type 0x40000410000 long unsigned int public unsigned sizetype DI size <integer_cst 0x40000310780 constant 64> unit size <integer_cst 0x400003107a8 constant 8> align 64 symtab 0 alias set -1 canonical type 0x40000410000 precision 64 min <integer_cst 0x400003107d0 0> max <integer_cst 0x40000310aa0 -1>> visited var <var_decl 0x400004f1fe0 D.2060>def_stmt D.2060_43 = ivtmp.27_37 + D.2059_42; version 43> (gdb) call debug_tree(arg1) <integer_cst 0x400003104b0 type <integer_type 0x40000410000 long unsigned int> constant 1> -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30338