http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50283
--- Comment #17 from vries at gcc dot gnu.org 2012-01-11 09:45:02 UTC ---
>> Either way, we should be able to formulate an assert in scan_trace that
>> checks this condition. Do you think that would be useful?
> You absolutely correct that we ought to have a check for this.
Is this check good, or is there another component (f.i.
target/configure-specific)? :
...
Index: gcc/dwarf2cfi.c
===================================================================
--- gcc/dwarf2cfi.c (revision 183070)
+++ gcc/dwarf2cfi.c (working copy)
@@ -2474,6 +2474,7 @@ scan_trace (dw_trace_info *trace)
for (i = 1; i < n; ++i)
{
elt = XVECEXP (pat, 0, i);
+ gcc_assert (!(CALL_P (control) && RTX_FRAME_RELATED_P (elt)));
scan_insn_after (elt);
}
...
A mips64el-linux-gnu build already fails this assert at libgcc2.c, on an insn:
...
(insn 92 73 29 (sequence [
(call_insn/j 27 73 74 (set (reg:DI 2 $2)
(call (mem:SI (reg/f:SI 25 $25 [205]) [0 __fixunssfdi S4
A32])
(unspec [
(const_int 0 [0])
(symbol_ref:SI ("__fixunssfdi") [flags 0x41]
<function_decl 0xf7dbe400 __fixunssfdi>)
] UNSPEC_CALL_ATTR))) libgcc2.c:1393 571
{sibcall_value_internal}
(expr_list:REG_DEAD (reg:SF 44 $f12)
(expr_list:REG_DEAD (reg/f:SI 25 $25 [205])
(nil)))
(expr_list:REG_DEP_TRUE (use (reg:SI 79 $fakec))
(expr_list:REG_NORETURN (use (reg:SF 44 $f12))
(nil))))
(insn/f 74 27 86 (set (reg/f:SI 29 $sp)
(plus:SI (reg/f:SI 29 $sp)
(const_int 16 [0x10]))) 10 {*addsi3}
(expr_list:REG_CFA_DEF_CFA (reg/f:SI 29 $sp)
(expr_list:REG_CFA_RESTORE (reg:DI 28 $28)
(expr_list:REG_CFA_RESTORE (reg:DI 31 $31)
(nil)))))
]) libgcc2.c:1393 -1
(nil))
...