This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/23943] [4.1 Regression] segv in side_effects_p()
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Sep 2005 12:39:23 -0000
- Subject: [Bug rtl-optimization/23943] [4.1 Regression] segv in side_effects_p()
- References: <20050918112430.23943.marcus@jet.franken.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-18 12:39 -------
Target specific, cannot reproduce on i686. Stacktrace:
#0 0x00000000008c5b35 in side_effects_p (x=0x0) at rtlanal.c:2001
#1 0x00000000008c5c3e in side_effects_p (x=0x2a95a63120) at rtlanal.c:2055
#2 0x00000000008c5c3e in side_effects_p (x=0x2a95a63100) at rtlanal.c:2055
#3 0x00000000008c5c3e in side_effects_p (x=0x2a95a630c0) at rtlanal.c:2055
#4 0x00000000008c5c3e in side_effects_p (x=0x2a95a630a0) at rtlanal.c:2055
#5 0x00000000008c5c3e in side_effects_p (x=0x2a95a61940) at rtlanal.c:2055
#6 0x00000000008c5c3e in side_effects_p (x=0x2a95a61920) at rtlanal.c:2055
#7 0x00000000008c5c3e in side_effects_p (x=0x2a95a63280) at rtlanal.c:2055
#8 0x00000000008d5f55 in simplify_ternary_operation (code=IF_THEN_ELSE,
mode=VOIDmode, op0_mode=VOIDmode, op0=0x2a95a63280, op1=0x2a95a61140,
op2=0x2a95893000) at simplify-rtx.c:3425
#9 0x00000000008cd4ae in simplify_gen_ternary (code=IF_THEN_ELSE,
mode=VOIDmode, op0_mode=VOIDmode, op0=0x2a95a63280, op1=0x2a95a61140,
op2=0x2a95893000) at simplify-rtx.c:246
#10 0x00000000008cd817 in simplify_replace_rtx (x=0x2a95a61160,
old_rtx=0x2a95a610c0, new_rtx=0x2a95a61920) at simplify-rtx.c:327
#11 0x00000000006fbb2e in cprop_jump (bb=0x2a95a57100, setcc=0x2a95a5f410,
jump=0x2a95a44930, from=0x2a95a5eae0, src=0x2a95a5ea80) at gcse.c:2802
simplify_replace_rtx is called with
(gdb) call debug_rtx (x)
(if_then_else (eq (reg:CCZ 17 flags)
(const_int 0 [0x0]))
(label_ref 32)
(pc))
(gdb) call debug_rtx (old_rtx)
(reg:CCZ 17 flags)
(gdb) call debug_rtx (new_rtx)
(compare:CCZ (mem/s:QI (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 0x2a9590e500 strlen>)
(expr_list:REG_DEP_TRUE (symbol_ref:DI ("savecallsin")
[flags 0x2] <var_decl 0x2a95a3ddc0 savecallsin>)
(nil))))
(const:DI (plus:DI (symbol_ref:DI ("savecallsin") [flags 0x2]
<var_decl 0x2a95a3ddc0 savecallsin>)
(const_int -1 [0xffffffffffffffff])))) [0 savecallsin S1 A8])
(const_int 47 [0x2f]))
the last side_effects_p calls look like
#2 0x00000000008c5c3e in side_effects_p (x=0x2a95a63100) at rtlanal.c:2055
2055 if (side_effects_p (XEXP (x, i)))
(gdb) call debug_rtx (x)
(expr_list:REG_DEP_TRUE (symbol_ref:DI ("strlen") [flags 0x41] <function_decl
0x2a9590e500 strlen>)
(expr_list:REG_DEP_TRUE (symbol_ref:DI ("savecallsin") [flags 0x2] <var_decl
0x2a95a3ddc0 savecallsin>)
(nil)))
#1 0x00000000008c5c3e in side_effects_p (x=0x2a95a63120) at rtlanal.c:2055
2055 if (side_effects_p (XEXP (x, i)))
(gdb) call debug_rtx (x)
(expr_list:REG_DEP_TRUE (symbol_ref:DI ("savecallsin") [flags 0x2] <var_decl
0x2a95a3ddc0 savecallsin>)
(nil))
#0 0x00000000008c5b35 in side_effects_p (x=0x0) at rtlanal.c:2001
2051 for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
2052 {
2053 if (fmt[i] == 'e')
2054 {
2055 if (side_effects_p (XEXP (x, i)))
2056 return 1;
2057 }
2058 else if (fmt[i] == 'E')
2059 {
is a (nil) rtx as 2nd argument to EXPR_LIST ok?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|tree-optimization |rtl-optimization
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-09-18 12:39:21
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23943