[Bug rtl-optimization/23943] [4.1 Regression] segv in side_effects_p()
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Sep 18 14:13:00 GMT 2005
------- Additional Comments From steven at gcc dot gnu dot org 2005-09-18 14:13 -------
The problematic RTL is produced in cse.c:find_best_addr(),
Breakpoint 12, find_best_addr (insn=0x2a95a5d820, loc=0x2a95a64ac8,
mode=QImode) at cse.c:3004
3004 rtx new = simplify_gen_binary (GET_CODE (*loc), Pmode,
(gdb) ll
Undefined command: "ll". Try "help".
(gdb) l
2999 p = p->next_same_value, count++)
3000 if (! p->flag
3001 && (REG_P (p->exp)
3002 || exp_equiv_p (p->exp, p->exp, 1, false)))
3003 {
3004 rtx new = simplify_gen_binary (GET_CODE (*loc), Pmode,
3005 p->exp, op1);
3006 int new_cost;
3007
3008 /* Get the canonical version of the address so we can
accept
(gdb) p debug_rtx (*loc)
(plus:DI (reg:DI 62)
(const:DI (plus:DI (symbol_ref:DI ("savecallsin") [flags 0x2] <var_decl
0x2a95a3cdc0 savecallsin>)
(const_int -1 [0xffffffffffffffff]))))
$60 = void
(gdb) p p->exp
$61 = 0x2a95a5efe0
(gdb) p debug_rtx (p->exp)
(expr_list:REG_DEP_TRUE (use (mem:BLK (scratch) [0 A8]))
(expr_list:REG_DEP_TRUE (symbol_ref:DI ("strlen") [flags 0x41]
<function_decl 0x2a9590d500 strlen>)
(expr_list:REG_DEP_TRUE (symbol_ref:DI ("savecallsin") [flags 0x2]
<var_decl 0x2a95a3cdc0 savecallsin>)
(nil))))
$62 = void
(gdb) next
3010 new = canon_for_address (new);
(gdb) p debug_rtx (new)
(plus:DI (expr_list:REG_DEP_TRUE (use (mem:BLK (scratch) [0 A8]))
(expr_list:REG_DEP_TRUE (symbol_ref:DI ("strlen") [flags 0x41]
<function_decl 0x2a9590d500 strlen>)
(expr_list:REG_DEP_TRUE (symbol_ref:DI ("savecallsin") [flags 0x2]
<var_decl 0x2a95a3cdc0 savecallsin>)
(nil))))
(const:DI (plus:DI (symbol_ref:DI ("savecallsin") [flags 0x2] <var_decl
0x2a95a3cdc0 savecallsin>)
(const_int -1 [0xffffffffffffffff]))))
$63 = void
(gdb)
My first question here was, why do we record EXPR_LISTs here? But apparently
we need to do so for libcalls. Maybe we should not substitute EXPR_LISTs
here, or make them rediculously expensive.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23943
More information about the Gcc-bugs
mailing list