[Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013

2014-09-11 Thread pangbw at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826

baoshan pangbw at gmail dot com changed:

   What|Removed |Added

 CC||pangbw at gmail dot com

--- Comment #10 from baoshan pangbw at gmail dot com ---
The code is broken in the latest code because beside NOTE instruction there
could be BARRIER too, for instance the RTX list I am seeing:

(call_insn 32 35 33 (parallel [
(set (reg:SI 2 $2)
(call (mem:SI (reg:SI 25 $25 [198]) [0  S4 A32])
(const_int 16 [0x10])))
(clobber (reg:SI 31 $31))
(clobber (reg:SI 28 $28))
]) min.c:20 603 {call_value_split}
 (nil)
(expr_list (use (reg:SI 79 $fakec))
(expr_list (use (reg:SI 28 $28))
(expr_list:SI (use (reg:SI 5 $5))
(expr_list:SI (use (reg:SI 4 $4))
(nil))
(insn 33 32 34 (set (reg:SI 28 $28)
(mem/c:SI (plus:SI (reg/f:SI 29 $sp)
(const_int 16 [0x10])) [0  S4 A32])) min.c:20 288
{*movsi_internal}
 (nil))
(barrier 34 33 18)
(barrier 18 34 30)
(note 30 18 21 (expr_list:REG_DEP_TRUE (concat:SI (pc)
(unspec:SI [
(reg:SI 28 $28)
(const:SI (unspec:SI [
(symbol_ref:SI (signal) [flags 0x41] 
function_decl 0xb71f6700 signal)
] 227))
(reg:SI 79 $fakec)
] UNSPEC_LOAD_CALL))
(expr_list:REG_DEP_TRUE (concat:SI (reg:SI 5 $5)
(const_int 0 [0]))
(expr_list:REG_DEP_TRUE (concat:SI (reg:SI 4 $4)
(const_int 2 [0x2]))
(nil NOTE_INSN_CALL_ARG_LOCATION)
(note 21 30 0 NOTE_INSN_DELETED)


[Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013

2014-09-11 Thread pangbw at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826

--- Comment #11 from baoshan pangbw at gmail dot com ---
And I don't thing it is the best place to fix this bug in function try_split().
Why not fix it at where the ICE occurs? It is just the wrong expectation from
function dwarf2out_var_location(). Why not just look forward further if the
'prev'is not what we want? I like to add this code before gcc_assert() to fix
this issue:

   while(prev  !CALL_P(prev)  !(GET_CODE (PATTERN (prev)) == SEQUENCE
  CALL_P (XVECEXP (PATTERN (prev), 0, 0{
  gcc_assert(NONJUMP_INSN_P (prev));
  prev = prev_real_insn (prev);
}


[Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013

2011-05-26 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826

--- Comment #9 from Ryan Mansfield rmansfield at qnx dot com 2011-05-26 
14:20:54 UTC ---
Richard, thanks for your patch. It fixed most of the failures I saw but there
are still cases where the note doesn't get moved after call split. The
following example ICEs with rev174285.

void  foo ()
{
  int *const pc = __builtin_return_address (0);
  bar (pc);
}


[Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013

2011-05-23 Thread rsandifo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826

--- Comment #6 from rsandifo at gcc dot gnu.org rsandifo at gcc dot gnu.org 
2011-05-23 17:57:38 UTC ---
Author: rsandifo
Date: Mon May 23 17:57:35 2011
New Revision: 174080

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=174080
Log:
gcc/
PR rtl-optimization/48826
* emit-rtl.c (try_split): When splitting a call that is followed
by a NOTE_INSN_CALL_ARG_LOCATION, move the note after the new call.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/emit-rtl.c


[Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013

2011-05-23 Thread rsandifo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826

rsand...@gcc.gnu.org rsandifo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #7 from rsandifo at gcc dot gnu.org rsandifo at gcc dot gnu.org 
2011-05-23 18:24:31 UTC ---
Fixed on trunk.


[Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013

2011-05-23 Thread rsandifo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826

rsand...@gcc.gnu.org rsandifo at gcc dot gnu.org changed:

   What|Removed |Added

 CC||aldot at gcc dot gnu.org

--- Comment #8 from rsandifo at gcc dot gnu.org rsandifo at gcc dot gnu.org 
2011-05-23 18:27:33 UTC ---
*** Bug 48843 has been marked as a duplicate of this bug. ***


[Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013

2011-05-22 Thread rsandifo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826

rsand...@gcc.gnu.org rsandifo at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.05.22 21:06:18
 CC||rsandifo at gcc dot gnu.org
  Component|debug   |rtl-optimization
 AssignedTo|unassigned at gcc dot   |rsandifo at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #5 from rsandifo at gcc dot gnu.org rsandifo at gcc dot gnu.org 
2011-05-22 21:06:18 UTC ---
About to post a patch.