Indeed, ptr_mode!=Pmode for my target. I will try to figure out where such a Pmode comes from.
Thanks, Aurélien 2011/10/23 Richard Guenther <richard.guent...@gmail.com>: > On Fri, Oct 21, 2011 at 4:53 PM, Aurelien Buhrig > <aurelien.buhrig....@gmail.com> wrote: >> Hi, >> >> I'm trying to port gcc 4.6.1 for a new target for which Pmode=PSI. >> I have an ICE in size_binop_loc, at fold-const.c:1433 when compiling >> gcc.c-torture/compile/921111-1.c >> >> Here is the back trace >> #1 0x000000000060f8f3 in size_binop_loc (loc=0, code=PLUS_EXPR, >> arg0=0x2aaaae8d8150, arg1=0x2aaaae874dc0) >> at /home/buhrig/work/embedded/sdk/gcc/v2/src/gcc/fold-const.c:1432 >> #2 0x00000000007ddefd in dr_analyze_innermost (dr=0xf5b0f0) at >> /home/buhrig/work/embedded/sdk/gcc/v2/src/gcc/tree-data-ref.c:765 >> #3 0x00000000007de881 in create_data_ref (nest=0x0, >> loop=0x2aaaae8917f8, memref=0x2aaaae87c558, stmt=0x2aaaae88ca00, >> is_read=1 '\001') >> at /home/buhrig/work/embedded/sdk/gcc/v2/src/gcc/tree-data-ref.c:970 >> #4 0x00000000007e7d0d in find_data_references_in_stmt (nest=0x0, >> stmt=0x2aaaae88ca00, datarefs=0xf57c98) >> at /home/buhrig/work/embedded/sdk/gcc/v2/src/gcc/tree-data-ref.c:4238 >> #5 0x00000000007e810d in find_data_references_in_bb (loop=0x0, >> bb=0x2aaaae879548, datarefs=0xf57c98) >> at /home/buhrig/work/embedded/sdk/gcc/v2/src/gcc/tree-data-ref.c:4307 >> #6 0x00000000007e8838 in compute_data_dependences_for_bb >> (bb=0x2aaaae879548, compute_self_and_read_read_dependences=1 '\001', >> datarefs=0xf57c98, >> dependence_relations=0xf57ca0) at >> /home/buhrig/work/embedded/sdk/gcc/v2/src/gcc/tree-data-ref.c:4493 >> #7 0x0000000000a91c71 in vect_analyze_data_refs (loop_vinfo=0x0, >> bb_vinfo=0xf57c80, min_vf=0x7fffffffd17c) >> at >> /home/buhrig/work/embedded/sdk/gcc/v2/src/gcc/tree-vect-data-refs.c:2533 >> #8 0x000000000092705c in vect_slp_analyze_bb (bb=0x2aaaae879548) at >> /home/buhrig/work/embedded/sdk/gcc/v2/src/gcc/tree-vect-slp.c:1704 >> #9 0x0000000000929d1b in execute_vect_slp () at >> /home/buhrig/work/embedded/sdk/gcc/v2/src/gcc/tree-vectorizer.c:256 >> >> It seems dr_analyze_innermost calls size_binop (PLUS_EXPR, poffset, >> TREE_OPERAND (base, 1)) >> with poffset an intreger SImode, and TREE_OPERAND (base, 1) a pointer, PSI. >> So int_binop_types_match_p fails in TYPE_MODE (type1) == TYPE_MODE (type2). >> >> I'm not sure where is the bug, if it is TREE_OPERAND (base, 1)) that >> should be INTEGER (where should the conversion be?), or size_binop >> that should work with PSI/SI ... > > You should be only seeing ptr_mode at the tree level, not Pmode (well, > if they are > not the same). > > Richard. > >> Thanks, >> Aurélien >> >