public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013
@ 2011-04-29 16:30 rmansfield at qnx dot com
2011-05-04 13:04 ` [Bug debug/48826] " rmansfield at qnx dot com
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: rmansfield at qnx dot com @ 2011-04-29 16:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826
Summary: ICE in dwarf2out_var_location, at dwarf2out.c:22013
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rmansfield@qnx.com
Host: i686-linux-gnu
Target: mips-unknown-linux-uclibc
Build: i686-linux-gnu
$ cat ice.i
int foo() {
return bar();
}
$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: mips-unknown-linux-uclibc
Configured with: ../configure --target=mips-unknown-linux-uclibc
--prefix=/home/ryan/x-tools/mips-unknown-linux-uclibc
--with-sysroot=/home/ryan/x-tools/mips-unknown-linux-uclibc/mips-unknown-linux-uclibc/sys-root
--enable-languages=c --disable-multilib --with-float=soft --enable-__cxa_atexit
--with-local-prefix=/home/ryan/x-tools/mips-unknown-linux-uclibc/mips-unknown-linux-uclibc/sys-root
--disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99
--enable-long-long --enable-target-optspace
Thread model: posix
gcc version 4.7.0 20110429 (experimental) [trunk revision 173156] (GCC)
$ ./xgcc -B. -O -g ice.i
ice.i: In function 'foo':
ice.i:3:1: internal compiler error: in dwarf2out_var_location, at
dwarf2out.c:22013
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
@ 2011-05-04 13:04 ` rmansfield at qnx dot com
2011-05-04 14:26 ` rmansfield at qnx dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rmansfield at qnx dot com @ 2011-05-04 13:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826
--- Comment #1 from Ryan Mansfield <rmansfield at qnx dot com> 2011-05-04 13:01:31 UTC ---
The change that introduced this ICE is rev171033.
http://gcc.gnu.org/viewcvs?view=revision&revision=171033
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
2011-05-04 13:04 ` [Bug debug/48826] " rmansfield at qnx dot com
@ 2011-05-04 14:26 ` rmansfield at qnx dot com
2011-05-04 14:44 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rmansfield at qnx dot com @ 2011-05-04 14:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826
Ryan Mansfield <rmansfield at qnx dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Ryan Mansfield <rmansfield at qnx dot com> 2011-05-04 14:06:56 UTC ---
After rev171033 debugging is completely broken for this mips configuration.
i.e. everything build I compile with -g ICEs this way.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
2011-05-04 13:04 ` [Bug debug/48826] " rmansfield at qnx dot com
2011-05-04 14:26 ` rmansfield at qnx dot com
@ 2011-05-04 14:44 ` jakub at gcc dot gnu.org
2011-05-05 13:22 ` rmansfield at qnx dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-04 14:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-04 14:10:20 UTC ---
Most probably the backend is reordering insns after var-tracking, it shouldn't
be doing that. ARM/SH/S390 backends all have fixed similar bugs very quickly
after this patch went in.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug debug/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
` (2 preceding siblings ...)
2011-05-04 14:44 ` jakub at gcc dot gnu.org
@ 2011-05-05 13:22 ` rmansfield at qnx dot com
2011-05-22 21:41 ` [Bug rtl-optimization/48826] " rsandifo at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rmansfield at qnx dot com @ 2011-05-05 13:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826
--- Comment #4 from Ryan Mansfield <rmansfield at qnx dot com> 2011-05-05 13:19:43 UTC ---
The issue with ARM/SH/S390 backends appears to be there was a literal pool
split happening in between a call insn and the NOTE_INSN_CALL_ARG_LOCATION. It
looks like on mips the issue, at least for my testcase, is the gp store in
mips_split_call is getting emitted in between the call insn and the note.
(call_insn 39 5 40 (parallel [
(set (reg:SI 2 $2)
(call (mem:SI (reg:SI 25 $25 [196]) [0 S4 A32])
(const_int 16 [0x10])))
(clobber (reg:SI 31 $31))
(clobber (reg:SI 28 $28))
]) /home/ryan/ice.i:2 575 {call_value_split}
(nil)
(expr_list:REG_DEP_TRUE (use (reg:SI 79 $fakec))
(expr_list:REG_DEP_TRUE (use (reg:SI 28 $28))
(nil))))
(insn 40 39 32 (set (reg:SI 28 $28)
(mem/c:SI (plus:SI (reg/f:SI 29 $sp)
(const_int 16 [0x10])) [0 S4 A32])) /home/ryan/ice.i:2 280
{*movsi_internal}
(nil))
(note 32 40 7 (expr_list:REG_DEP_TRUE (concat:SI (reg:SI 79 $fakec)
(reg:SI 79 $fakec))
(expr_list:REG_DEP_TRUE (concat:SI (reg:SI 28 $28)
(reg:SI 28 $28))
(nil))) NOTE_INSN_CALL_ARG_LOCATION)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
` (3 preceding siblings ...)
2011-05-05 13:22 ` rmansfield at qnx dot com
@ 2011-05-22 21:41 ` rsandifo at gcc dot gnu.org
2011-05-23 18:37 ` rsandifo at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-05-22 21:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826
rsandifo@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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
` (4 preceding siblings ...)
2011-05-22 21:41 ` [Bug rtl-optimization/48826] " rsandifo at gcc dot gnu.org
@ 2011-05-23 18:37 ` rsandifo at gcc dot gnu.org
2011-05-23 18:44 ` rsandifo at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-05-23 18:37 UTC (permalink / raw)
To: gcc-bugs
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=gcc&view=rev&rev=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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
` (5 preceding siblings ...)
2011-05-23 18:37 ` rsandifo at gcc dot gnu.org
@ 2011-05-23 18:44 ` rsandifo at gcc dot gnu.org
2011-05-23 18:57 ` rsandifo at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-05-23 18:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826
rsandifo@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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
` (6 preceding siblings ...)
2011-05-23 18:44 ` rsandifo at gcc dot gnu.org
@ 2011-05-23 18:57 ` rsandifo at gcc dot gnu.org
2011-05-26 14:32 ` rmansfield at qnx dot com
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-05-23 18:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48826
rsandifo@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. ***
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
` (7 preceding siblings ...)
2011-05-23 18:57 ` rsandifo at gcc dot gnu.org
@ 2011-05-26 14:32 ` rmansfield at qnx dot com
2014-09-11 21:44 ` pangbw at gmail dot com
2014-09-11 21:50 ` pangbw at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: rmansfield at qnx dot com @ 2011-05-26 14:32 UTC (permalink / raw)
To: gcc-bugs
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);
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
` (8 preceding siblings ...)
2011-05-26 14:32 ` rmansfield at qnx dot com
@ 2014-09-11 21:44 ` pangbw at gmail dot com
2014-09-11 21:50 ` pangbw at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: pangbw at gmail dot com @ 2014-09-11 21:44 UTC (permalink / raw)
To: gcc-bugs
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)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/48826] ICE in dwarf2out_var_location, at dwarf2out.c:22013
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
` (9 preceding siblings ...)
2014-09-11 21:44 ` pangbw at gmail dot com
@ 2014-09-11 21:50 ` pangbw at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: pangbw at gmail dot com @ 2014-09-11 21:50 UTC (permalink / raw)
To: gcc-bugs
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);
}
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-09-11 21:50 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-29 16:30 [Bug debug/48826] New: ICE in dwarf2out_var_location, at dwarf2out.c:22013 rmansfield at qnx dot com
2011-05-04 13:04 ` [Bug debug/48826] " rmansfield at qnx dot com
2011-05-04 14:26 ` rmansfield at qnx dot com
2011-05-04 14:44 ` jakub at gcc dot gnu.org
2011-05-05 13:22 ` rmansfield at qnx dot com
2011-05-22 21:41 ` [Bug rtl-optimization/48826] " rsandifo at gcc dot gnu.org
2011-05-23 18:37 ` rsandifo at gcc dot gnu.org
2011-05-23 18:44 ` rsandifo at gcc dot gnu.org
2011-05-23 18:57 ` rsandifo at gcc dot gnu.org
2011-05-26 14:32 ` rmansfield at qnx dot com
2014-09-11 21:44 ` pangbw at gmail dot com
2014-09-11 21:50 ` pangbw at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).