[Bug tree-optimization/58464] [4.9 Regression] Crashes with SIGSEGV (infinite recursion in phi_translate)

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 23 10:23:00 GMT 2013


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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Translating {component_ref<cur>,mem_ref<0B>,result_296}@.MEM_407 through

<bb 141>:
goto <bb 63>;

<bb 63>:
# min_size_293 = PHI <min_size_274(62), 8000(141)>
_294 = min_size_293 + 16;
# .MEM_406 = VDEF <.MEM_405>
base_295 = xmalloc (_294);
result_296 = base_295 + min_size_293;
# .MEM_407 = VDEF <.MEM_406>
result_296->cur = base_295;
goto <bb 68>;

recurses via

1774      phitrans = phi_translate_1 (expr, set1, set2, pred, phiblock);
(gdb) call debug_pre_expr (expr)
{pointer_plus_expr,base_295,min_size_293}

1774      phitrans = phi_translate_1 (expr, set1, set2, pred, phiblock);
(gdb) call debug_pre_expr (expr)
{component_ref<cur>,mem_ref<0B>,result_296}@.MEM_407

where {component_ref<cur>,mem_ref<0B>,result_296}@.MEM_407 is the leader
for base_295 and {pointer_plus_expr,base_295,min_size_293} is the leader
for result_296.

So that circumvents

                leader = find_leader_in_sets (op_val_id, set1, set2);
                if (!leader)
                  break;
                /* Make sure we do not recursively translate ourselves
                   like for translating a[n_1] with the leader for
                   n_1 being a[n_1].  */
                if (get_expression_id (leader) != get_expression_id (expr))
                  {

because it's a recursion with two levels ...



More information about the Gcc-bugs mailing list