public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/42918] New: "-fcompare-debug failure" with "-O2 -ftracer" (2)
@ 2010-01-31 22:52 zsojka at seznam dot cz
2010-01-31 22:53 ` [Bug debug/42918] " zsojka at seznam dot cz
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-01-31 22:52 UTC (permalink / raw)
To: gcc-bugs
Command line:
gcc -O2 -ftracer -fcompare-debug -c testcase.c
Tested revisions:
r156367 - crash
r155609 - crash
r154830 - crash
r153685 - crash
Output:
$ /mnt/svn/gcc-trunk/binary-156367-lto/bin/gcc -O2 -ftracer -fcompare-debug -c
testcase.c
gcc: testcase.c: -fcompare-debug failure (length)
--
Summary: "-fcompare-debug failure" with "-O2 -ftracer" (2)
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
GCC host triplet: x86(_64)-pc-linux-gnu
GCC target triplet: x86(_64)-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42918
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/42918] "-fcompare-debug failure" with "-O2 -ftracer" (2)
2010-01-31 22:52 [Bug debug/42918] New: "-fcompare-debug failure" with "-O2 -ftracer" (2) zsojka at seznam dot cz
@ 2010-01-31 22:53 ` zsojka at seznam dot cz
2010-02-07 20:30 ` [Bug debug/42918] [4.5 Regression] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-01-31 22:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from zsojka at seznam dot cz 2010-01-31 22:53 -------
Created an attachment (id=19768)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19768&action=view)
reduced testcase
Command line:
gcc -O2 -ftracer -fcompare-debug -c pr42918.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42918
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/42918] [4.5 Regression] "-fcompare-debug failure" with "-O2 -ftracer" (2)
2010-01-31 22:52 [Bug debug/42918] New: "-fcompare-debug failure" with "-O2 -ftracer" (2) zsojka at seznam dot cz
2010-01-31 22:53 ` [Bug debug/42918] " zsojka at seznam dot cz
@ 2010-02-07 20:30 ` pinskia at gcc dot gnu dot org
2010-02-11 16:54 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-02-07 20:30 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code, wrong-
| |code
Summary|"-fcompare-debug failure" |[4.5 Regression] "-fcompare-
|with "-O2 -ftracer" (2) |debug failure" with "-O2 -
| |ftracer" (2)
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42918
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/42918] [4.5 Regression] "-fcompare-debug failure" with "-O2 -ftracer" (2)
2010-01-31 22:52 [Bug debug/42918] New: "-fcompare-debug failure" with "-O2 -ftracer" (2) zsojka at seznam dot cz
2010-01-31 22:53 ` [Bug debug/42918] " zsojka at seznam dot cz
2010-02-07 20:30 ` [Bug debug/42918] [4.5 Regression] " pinskia at gcc dot gnu dot org
@ 2010-02-11 16:54 ` rguenth at gcc dot gnu dot org
2010-02-15 17:06 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-02-11 16:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2010-02-11 16:53 -------
Confirmed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Priority|P3 |P1
Last reconfirmed|0000-00-00 00:00:00 |2010-02-11 16:53:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42918
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/42918] [4.5 Regression] "-fcompare-debug failure" with "-O2 -ftracer" (2)
2010-01-31 22:52 [Bug debug/42918] New: "-fcompare-debug failure" with "-O2 -ftracer" (2) zsojka at seznam dot cz
` (2 preceding siblings ...)
2010-02-11 16:54 ` rguenth at gcc dot gnu dot org
@ 2010-02-15 17:06 ` jakub at gcc dot gnu dot org
2010-02-15 20:56 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-02-15 17:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2010-02-15 17:06 -------
The problem here is missing INSN location on insn generated by insert_restore
with -g (without -g it has one).
Before IRA we have:
(note 26 25 27 5 [bb 5] NOTE_INSN_BASIC_BLOCK)
(call_insn 27 26 28 5 pr42918.c:14 (call (mem:QI (symbol_ref:DI ("fv") [flags
0x41] <function_decl 0x7feab75d6b00 fv>) [0 S1 A8])
(const_int 0 [0x0])) 638 {*call_0} (nil)
(nil))
(note 28 27 30 5 ("lab") NOTE_INSN_DELETED_LABEL 3)
(debug_insn 30 28 34 5 (var_location:SI i (reg/v:SI 59 [ i ])) -1 (nil))
at the end of a basic block (obviously with -g0 the debug_insn is missing).
Now save_call_clobbered_regs restores all still saved regs at the end of a
basic block, when the bb doesn't end with a jump, it restores after the last
insn mentioned in reload_insn_chain for that bb, when it is a jump, then before
it.
As DEBUG_INSNs are included in reload_insn_chain, that is for -g after the
DEBUG_INSN (and as insert_restore inserts after that insn, the insn has no
location as DEBUG_INSN has no location either). For -g0 that is after the call
insn, which has location and thus the restore insn gets the location of the
call.
Although emit_insn_after ignores DEBUG_INSNs, it doesn't ignore notes and there
is this deleted label note in between.
Changing save_call_clobbered_regs to restore all regs after the last non-debug
insn in a bb wouldn't work well, as the restore insn invalidates the hard regs
that could still hold something in the debug insn.
I guess we could remember the INSN_LOCATOR of the last non-debug insn in the
reload chain and use emit_insn_after_setloc in insert_restore (going to test it
now), but wonder whether the fact that the deleted label is now after the hard
reg restore insn in the -g0 case and before it in the -g case couldn't
introduce other -fcompare-debug differences on other testcases.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42918
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/42918] [4.5 Regression] "-fcompare-debug failure" with "-O2 -ftracer" (2)
2010-01-31 22:52 [Bug debug/42918] New: "-fcompare-debug failure" with "-O2 -ftracer" (2) zsojka at seznam dot cz
` (3 preceding siblings ...)
2010-02-15 17:06 ` jakub at gcc dot gnu dot org
@ 2010-02-15 20:56 ` jakub at gcc dot gnu dot org
2010-02-17 8:55 ` jakub at gcc dot gnu dot org
2010-02-17 8:59 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-02-15 20:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2010-02-15 20:55 -------
Created an attachment (id=19882)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19882&action=view)
gcc45-pr42918.patch
Patch I've bootstrapped/regtested on x86_64-linux and i686-linux.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42918
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/42918] [4.5 Regression] "-fcompare-debug failure" with "-O2 -ftracer" (2)
2010-01-31 22:52 [Bug debug/42918] New: "-fcompare-debug failure" with "-O2 -ftracer" (2) zsojka at seznam dot cz
` (4 preceding siblings ...)
2010-02-15 20:56 ` jakub at gcc dot gnu dot org
@ 2010-02-17 8:55 ` jakub at gcc dot gnu dot org
2010-02-17 8:59 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-02-17 8:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2010-02-17 08:55 -------
Subject: Bug 42918
Author: jakub
Date: Wed Feb 17 08:54:59 2010
New Revision: 156823
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156823
Log:
PR debug/42918
* caller-save.c (save_call_clobbered_regs): If BB ends with
a DEBUG_INSN, move any notes in between last real insn and the last
DEBUG_INSN after the last DEBUG_INSN.
* gcc.dg/pr42918.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr42918.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/caller-save.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42918
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug debug/42918] [4.5 Regression] "-fcompare-debug failure" with "-O2 -ftracer" (2)
2010-01-31 22:52 [Bug debug/42918] New: "-fcompare-debug failure" with "-O2 -ftracer" (2) zsojka at seznam dot cz
` (5 preceding siblings ...)
2010-02-17 8:55 ` jakub at gcc dot gnu dot org
@ 2010-02-17 8:59 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-02-17 8:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2010-02-17 08:59 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42918
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-02-17 8:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-31 22:52 [Bug debug/42918] New: "-fcompare-debug failure" with "-O2 -ftracer" (2) zsojka at seznam dot cz
2010-01-31 22:53 ` [Bug debug/42918] " zsojka at seznam dot cz
2010-02-07 20:30 ` [Bug debug/42918] [4.5 Regression] " pinskia at gcc dot gnu dot org
2010-02-11 16:54 ` rguenth at gcc dot gnu dot org
2010-02-15 17:06 ` jakub at gcc dot gnu dot org
2010-02-15 20:56 ` jakub at gcc dot gnu dot org
2010-02-17 8:55 ` jakub at gcc dot gnu dot org
2010-02-17 8:59 ` jakub at gcc dot gnu dot org
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).