[Bug tree-optimization/19899] ICE: tree check: expected real_cst, have integer_cst in const_binop, at fold-const.c:1490 with -ftree-vectorize -msse2

dorit at il dot ibm dot com gcc-bugzilla@gcc.gnu.org
Sat Feb 12 16:43:00 GMT 2005


------- Additional Comments From dorit at il dot ibm dot com  2005-02-12 11:13 -------
As far as I can see it's related to scalar evolution (nothing gets vectorized, 
the ICE happens during the analysis stage of the vectorizer, when the 
vectorizer calls analyze_scalar_evolution):

(gdb) backtrace
#0  tree_check_failed (node=0x414902e0, file=0x49ab2c "../../gcc/gcc/fold-
const.c", line=1490, function=0x49abcc "const_binop") 
at ../../gcc/gcc/tree.c:5450
#1  0x00205504 in const_binop (code=MULT_EXPR, arg1=0x4148de58, 
arg2=0x414902e0, notrunc=0) at ../../gcc/gcc/fold-const.c:1543
#2  0x0021c1ac in fold (expr=0x4140c894) at ../../gcc/gcc/fold-const.c:7222
#3  0x003bbce4 in add_to_evolution (loop_nb=252, chrec_before=0x414902e0, 
code=1095294552, to_add=0x0) at ../../gcc/gcc/tree-scalar-evolution.c:897
#4  0x003bc644 in follow_ssa_edge_in_rhs (loop=0x413044e0, rhs=0x4148de58, 
halting_phi=0x412d9780, evolution_of_loop=0xbffff580) at ../../gcc/gcc/tree-
scalar-evolution.c:1176
#5  0x003bcff0 in follow_ssa_edge (loop=0x413044e0, def=0x4140c3f0, 
halting_phi=0x412d9780, evolution_of_loop=0xbffff580) at ../../gcc/gcc/tree-
scalar-evolution.c:1446
#6  0x003bd1e0 in analyze_evolution_in_loop (loop_phi_node=0x412d9780, 
init_cond=0x414902e0) at ../../gcc/gcc/tree-scalar-evolution.c:1497
#7  0x003bdf24 in analyze_scalar_evolution_1 (loop=0x413044e0, var=0x4140c534, 
res=0x0) at ../../gcc/gcc/tree-scalar-evolution.c:1798
#8  0x003be054 in analyze_scalar_evolution (loop=0x413044e0, var=0x4140c534) 
at ../../gcc/gcc/tree-scalar-evolution.c:1850
#9  0x00115918 in vect_analyze_scalar_cycles (loop_vinfo=0x41304600) 
at ../../gcc/gcc/tree-flow-inline.h:309
#10 0x00119004 in vect_analyze_loop (loop=0x41304600) at ../../gcc/gcc/tree-
vectorizer.c:5697
#11 0x00119244 in vectorize_loops (loops=0x413011a0) at ../../gcc/gcc/tree-
vectorizer.c:5815
#12 0x00093900 in execute_one_pass (pass=0x595cd0) at ../../gcc/gcc/tree-
optimize.c:528
#13 0x000939e0 in execute_pass_list (pass=0x595cd0) at ../../gcc/gcc/tree-
optimize.c:565
#14 0x000939f8 in execute_pass_list (pass=0x595c00) at ../../gcc/gcc/tree-
optimize.c:566
#15 0x000939f8 in execute_pass_list (pass=0x595520) at ../../gcc/gcc/tree-
optimize.c:566
#16 0x00093cec in tree_rest_of_compilation (fndecl=0x41487d24) 
at ../../gcc/gcc/tree-optimize.c:664
#17 0x0001b3e0 in c_expand_body (fndecl=0x4148f0e8) at ../../gcc/gcc/c-
decl.c:6437
#18 0x003b2a6c in cgraph_expand_function (node=0x4148f0e8) 
at ../../gcc/gcc/cgraphunit.c:822
#19 0x003b47d8 in cgraph_expand_all_functions () 
at ../../gcc/gcc/cgraphunit.c:1689
#20 0x003b4b78 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1786
#21 0x0034d234 in compile_file () at ../../gcc/gcc/toplev.c:1009
#22 0x0034f100 in do_compile () at ../../gcc/gcc/toplev.c:2101
#23 0x0034f184 in toplev_main (argc=6042020, argv=0x5c31d0) 
at ../../gcc/gcc/toplev.c:2133
#24 0x000027a8 in _start (argc=20, argv=0xbffffcb0, envp=0xbffffd04) 
at /SourceCache/Csu/Csu-47/crt.c:267
#25 0x8fe1a558 in __dyld__dyld_start ()
(gdb) 
(gdb) p debug_generic_expr(node)
-1
$2 = void
(gdb) up
#1  0x00205504 in const_binop (code=MULT_EXPR, arg1=0x4148de58, 
arg2=0x414902e0, notrunc=0) at ../../gcc/gcc/fold-const.c:1543
1543          tree r2 = TREE_REALPART (arg2);
(gdb) p debug_generic_expr(arg1)
1.0e+0
$3 = void
(gdb) p debug_generic_expr(arg2)
-1
$4 = void
(gdb) up
#2  0x0021c1ac in fold (expr=0x4140c894) at ../../gcc/gcc/fold-const.c:7222
7222            t1 = const_binop (code, arg0, arg1, 0);
(gdb) p debug_generic_expr(expr)
1.0e+0 * -1
$5 = void
(gdb) 

-- 


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



More information about the Gcc-bugs mailing list