http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46664

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-25 20:44:14 
UTC ---
With testcase at

http://www.kernel.org/pub/linux/devel/gcc/lto/wrf.ltrans2.o.gz

I got

[...@gnu-4 build_base_lto.0000]$
/export/gnu/import/svn/gcc-test-spec/usr/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto1
-quiet -dumpdir ./ -dumpbase wrf.ltrans2 -m32 -msse2 -mfpmath=sse
-mtune=generic -march=x86-64 -auxbase-strip wrf.ltrans2.ltrans.o -O2 -version
-ffast-math -fwhole-program -fuse-linker-plugin -frecord-marker=4 -fltrans
wrf.ltrans2.o -o wrf.ltrans2.s
GNU GIMPLE (GCC) version 4.6.0 20101124 (experimental) [trunk revision 167110]
(x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.6.0 20101124 (experimental) [trunk revision
167110], GMP version 4.3.2, MPFR version 2.4.2-p3, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU GIMPLE (GCC) version 4.6.0 20101124 (experimental) [trunk revision 167110]
(x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.6.0 20101124 (experimental) [trunk revision
167110], GMP version 4.3.2, MPFR version 2.4.2-p3, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
In file included from :12:0:
solve_em.fppized.f90: In function \u2018solve_em\u2019:
solve_em.fppized.f90:3:0: internal compiler error: in build2_stat, at
tree.c:3798
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[...@gnu-4 build_base_lto.0000]$ 

(gdb) bt
#0  fancy_abort (file=0xcf1141 "../../src-trunk/gcc/tree.c", line=3798, 
    function=0xcf5adf "build2_stat") at ../../src-trunk/gcc/diagnostic.c:892
#1  0x00000000008eb0d6 in build2_stat (code=POINTER_PLUS_EXPR, 
    tt=0x7ffff01cfc78, arg0=0x7fffef35f090, arg1=0x7fffef35f0c0)
    at ../../src-trunk/gcc/tree.c:3796
#2  0x00000000005e9919 in fold_build2_stat_loc (loc=0, code=POINTER_PLUS_EXPR, 
    type=0x7ffff01cfc78, op0=0x7fffef35f090, op1=0x7fffef35f0c0)
    at ../../src-trunk/gcc/fold-const.c:14081
#3  fold_build2_stat_loc (loc=0, code=POINTER_PLUS_EXPR, type=0x7ffff01cfc78, 
    op0=0x7fffef35f090, op1=0x7fffef35f0c0)
    at ../../src-trunk/gcc/fold-const.c:14053
#4  0x0000000000be191e in aff_combination_to_tree (comb=0x7fffffffd530)
    at ../../src-trunk/gcc/tree-affine.c:447
#5  0x0000000000840d7f in get_loop_invariant_expr_id (data=0x7fffffffd8b0, 
    use=<value optimized out>, cand=<value optimized out>, address_p=0 '\000', 
    depends_on=0x7fffffffd6d8, at=<value optimized out>, can_autoinc=0x0, 
    inv_expr_id=0x7fffffffd708)
    at ../../src-trunk/gcc/tree-ssa-loop-ivopts.c:3932
#6  get_computation_cost_at (data=0x7fffffffd8b0, use=<value optimized out>, 
    cand=<value optimized out>, address_p=0 '\000', depends_on=0x7fffffffd6d8, 
    at=<value optimized out>, can_autoinc=0x0, inv_expr_id=0x7fffffffd708)
    at ../../src-trunk/gcc/tree-ssa-loop-ivopts.c:4102
#7  0x0000000000842bbd in get_computation_cost (data=0x7fffffffd8b0, 
---Type <return> to continue, or q <return> to quit---
    use=0x2473f00, cand=0x2473fd0)
    at ../../src-trunk/gcc/tree-ssa-loop-ivopts.c:4182
#8  determine_use_iv_cost_generic (data=0x7fffffffd8b0, use=0x2473f00, 
    cand=0x2473fd0) at ../../src-trunk/gcc/tree-ssa-loop-ivopts.c:4209
#9  determine_use_iv_cost (data=0x7fffffffd8b0, use=0x2473f00, cand=0x2473fd0)
    at ../../src-trunk/gcc/tree-ssa-loop-ivopts.c:4501
#10 0x0000000000843109 in determine_use_iv_costs (data=0x7fffffffd8b0)
    at ../../src-trunk/gcc/tree-ssa-loop-ivopts.c:4607
#11 0x0000000000843b58 in tree_ssa_iv_optimize_loop (data=0x7fffffffd8b0, 
    loop=<value optimized out>)
    at ../../src-trunk/gcc/tree-ssa-loop-ivopts.c:6391
#12 0x0000000000845517 in tree_ssa_iv_optimize ()
    at ../../src-trunk/gcc/tree-ssa-loop-ivopts.c:6438
#13 0x000000000084fef7 in tree_ssa_loop_ivopts ()
    at ../../src-trunk/gcc/tree-ssa-loop.c:657
#14 0x00000000006d5b1f in execute_one_pass (pass=0x1163980)
    at ../../src-trunk/gcc/passes.c:1564
#15 0x00000000006d5de5 in execute_pass_list (pass=0x1163980)
    at ../../src-trunk/gcc/passes.c:1619
#16 0x00000000006d5df7 in execute_pass_list (pass=0x1163fe0)
    at ../../src-trunk/gcc/passes.c:1620
#17 0x00000000006d5df7 in execute_pass_list (pass=0x11631a0)
    at ../../src-trunk/gcc/passes.c:1620
---Type <return> to continue, or q <return> to quit---
#18 0x00000000007cc156 in tree_rest_of_compilation (fndecl=0x7ffff1b16e00)
    at ../../src-trunk/gcc/tree-optimize.c:422
#19 0x000000000096be42 in cgraph_expand_function (node=0x7ffff0dd2840)
    at ../../src-trunk/gcc/cgraphunit.c:1494
#20 0x000000000096e41a in cgraph_expand_all_functions ()
    at ../../src-trunk/gcc/cgraphunit.c:1553
#21 cgraph_optimize () at ../../src-trunk/gcc/cgraphunit.c:1809
#22 0x00000000004b8288 in lto_main () at ../../src-trunk/gcc/lto/lto.c:2468
#23 0x0000000000775e84 in compile_file (argc=23, argv=0x7fffffffdd78)
    at ../../src-trunk/gcc/toplev.c:806
#24 do_compile (argc=23, argv=0x7fffffffdd78)
    at ../../src-trunk/gcc/toplev.c:2206
#25 toplev_main (argc=23, argv=0x7fffffffdd78)
    at ../../src-trunk/gcc/toplev.c:2269
#26 0x0000003cfd21ee7d in __libc_start_main () from /lib64/libc.so.6
#27 0x000000000049f1d5 in _start ()
(gdb) f 1
#1  0x00000000008eb0d6 in build2_stat (code=POINTER_PLUS_EXPR, 
    tt=0x7ffff01cfc78, arg0=0x7fffef35f090, arg1=0x7fffef35f0c0)
    at ../../src-trunk/gcc/tree.c:3796
3796        gcc_assert (POINTER_TYPE_P (tt) && POINTER_TYPE_P (TREE_TYPE
(arg0))
(gdb) call debug_tree (arg0)
 <nop_expr 0x7fffef35f090
    type <integer_type 0x7ffff1c23000 public unsigned sizetype SI
        size <integer_cst 0x7ffff1c13708 constant 32>
        unit size <integer_cst 0x7ffff1c13410 constant 4>
        align 32 symtab 0 alias set -1 structural equality precision 32 min
<integer_cst 0x7ffff1c13730 0> max <integer_cst 0x7ffff1c13a50 -1>>

    arg 0 <ssa_name 0x7ffff01e7318
        type <pointer_type 0x7ffff1c23dc8 type <void_type 0x7ffff1c23d20>
            public unsigned SI size <integer_cst 0x7ffff1c13708 32> unit size
<integer_cst 0x7ffff1c13410 4>
            align 32 symtab 0 alias set -1 structural equality
            pointer_to_this <pointer_type 0x7ffff1c34bd0>>
        visited var <var_decl 0x7ffff01de8c0 D.36049>def_stmt D.36049_17926 =
__builtin_malloc (D.36050_17925);

        version 17926
        ptr-info 0x7ffff090bb40>>
(gdb) call debug_tree (tt)
 <pointer_type 0x7ffff01cfc78
    type <array_type 0x7ffff01cfa80
        type <real_type 0x7ffff1c30000 SF
            size <integer_cst 0x7ffff1c13708 constant 32>
            unit size <integer_cst 0x7ffff1c13410 constant 4>
            align 32 symtab 0 alias set -1 structural equality precision 32
            pointer_to_this <pointer_type 0x7ffff1c301f8> reference_to_this
<reference_type 0x7ffff16e41f8>>
        BLK
        size <var_decl 0x7ffff01d3460 D.35767 type <integer_type 0x7ffff1c230a8
bit_size_type>
            used unsigned ignored DI file module_diffusion_em.fppized.f90 line
2257 col 0
            size <integer_cst 0x7ffff1c13870 constant 64>
            unit size <integer_cst 0x7ffff1c13898 constant 8>
            align 64 context <function_decl 0x7ffff1b16e00 solve_em>
abstract_origin <var_decl 0x7ffff0daf960 D.20400>>
        unit size <var_decl 0x7ffff01d3500 D.35768 type <integer_type
0x7ffff1c23000>
            used unsigned ignored SI file module_diffusion_em.fppized.f90 line
2257 col 0 size <integer_cst 0x7ffff1c13708 32> unit size <integer_cst
0x7ffff1c13410 4>
            align 32 context <function_decl 0x7ffff1b16e00 solve_em>
abstract_origin <var_decl 0x7ffff0dafa00 D.20401>>
        align 32 symtab 0 alias set -1 canonical type 0x7ffff0db15e8
        domain <integer_type 0x7ffff01cfb28 type <integer_type 0x7ffff1c23498>
            SI size <integer_cst 0x7ffff1c13708 32> unit size <integer_cst
0x7ffff1c13410 4>
            align 32 symtab 0 alias set -1 canonical type 0x7ffff0db1690
precision 32 min <integer_cst 0x7ffff1c13c58 0> max <var_decl 0x7ffff01d33c0
D.35766>>
        pointer_to_this <pointer_type 0x7ffff01cfbd0>>
    public unsigned restrict SI size <integer_cst 0x7ffff1c13708 32> unit size
<integer_cst 0x7ffff1c13410 4>
    align 32 symtab 0 alias set -1 canonical type 0x7ffff0db1540>
(gdb)

Reply via email to