public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/100303] New: [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer
@ 2021-04-28 5:17 zsojka at seznam dot cz
2021-04-28 6:26 ` [Bug debug/100303] " rguenth at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2021-04-28 5:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100303
Bug ID: 100303
Summary: [11/12 Regression] -fcompare-debug failure (length)
with -O -fno-dce -ftracer
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
CC: aoliva at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Created attachment 50693
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50693&action=edit
auto-reduced testcase (from OpenTTD sources)
Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -fno-dce -ftracer -fcompare-debug testcase.C -w
x86_64-pc-linux-gnu-gcc: error: testcase.C: '-fcompare-debug' failure (length)
$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-174-20210427141825-g37d2b98100c-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-174-20210427141825-g37d2b98100c-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210427 (experimental) (GCC)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/100303] [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer
2021-04-28 5:17 [Bug debug/100303] New: [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer zsojka at seznam dot cz
@ 2021-04-28 6:26 ` rguenth at gcc dot gnu.org
2021-04-28 9:47 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-28 6:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100303
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/100303] [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer
2021-04-28 5:17 [Bug debug/100303] New: [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer zsojka at seznam dot cz
2021-04-28 6:26 ` [Bug debug/100303] " rguenth at gcc dot gnu.org
@ 2021-04-28 9:47 ` jakub at gcc dot gnu.org
2021-04-28 12:36 ` rsandifo at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-28 9:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100303
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
CC| |jakub at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-04-28
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r11-6188-g0b76990a9d75d97b84014e37519086b81824c307
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/100303] [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer
2021-04-28 5:17 [Bug debug/100303] New: [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer zsojka at seznam dot cz
2021-04-28 6:26 ` [Bug debug/100303] " rguenth at gcc dot gnu.org
2021-04-28 9:47 ` jakub at gcc dot gnu.org
@ 2021-04-28 12:36 ` rsandifo at gcc dot gnu.org
2021-04-29 16:25 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-04-28 12:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100303
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org
--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Oops, I should have thought about this case.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/100303] [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer
2021-04-28 5:17 [Bug debug/100303] New: [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer zsojka at seznam dot cz
` (2 preceding siblings ...)
2021-04-28 12:36 ` rsandifo at gcc dot gnu.org
@ 2021-04-29 16:25 ` cvs-commit at gcc dot gnu.org
2021-04-29 16:25 ` [Bug debug/100303] [11 " rsandifo at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-29 16:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100303
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:
https://gcc.gnu.org/g:c97351c0cf4872cc0e99e73ed17fb16659fd38b3
commit r12-292-gc97351c0cf4872cc0e99e73ed17fb16659fd38b3
Author: Richard Sandiford <richard.sandiford@arm.com>
Date: Thu Apr 29 17:24:57 2021 +0100
rtl-ssa: Fix -fcompare-debug failure [PR100303]
This patch fixes an oversight in the handling of debug instructions
in rtl-ssa. At the moment (and whether this is a good idea or not
remains to be seen), we maintain a linear RPO sequence of definitions
and non-debug uses. If a register is defined more than once, we use
a degenerate phi to reestablish a previous definition where necessary.
However, debug instructions shouldn't of course affect codegen,
so we can't create a new definition just for them. In those situations
we instead hang the debug use off the real definition (meaning that
debug uses do not follow a linear order wrt definitions). Again,
it remains to be seen whether that's a good idea.
The problem in the PR was that we weren't taking this into account
when increasing (or potentially increasing) the live range of an
existing definition. We'd create the phi even if it would only
be used by debug instructions.
The patch goes for the simple but inelegant approach of passing
a bool to say whether the use is a debug use or not. I imagine
this area will need some tweaking based on experience in future.
gcc/
PR rtl-optimization/100303
* rtl-ssa/accesses.cc (function_info::make_use_available): Take a
boolean that indicates whether the use will only be used in
debug instructions. Treat it in the same way that existing
cross-EBB debug references would be handled if so.
(function_info::make_uses_available): Likewise.
* rtl-ssa/functions.h (function_info::make_uses_available): Update
prototype accordingly.
(function_info::make_uses_available): Likewise.
* fwprop.c (try_fwprop_subst): Update call accordingly.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/100303] [11 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer
2021-04-28 5:17 [Bug debug/100303] New: [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer zsojka at seznam dot cz
` (3 preceding siblings ...)
2021-04-29 16:25 ` cvs-commit at gcc dot gnu.org
@ 2021-04-29 16:25 ` rsandifo at gcc dot gnu.org
2021-07-28 7:06 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-04-29 16:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100303
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11/12 Regression] |[11 Regression]
|-fcompare-debug failure |-fcompare-debug failure
|(length) with -O -fno-dce |(length) with -O -fno-dce
|-ftracer |-ftracer
--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed on trunk so far.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/100303] [11 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer
2021-04-28 5:17 [Bug debug/100303] New: [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer zsojka at seznam dot cz
` (4 preceding siblings ...)
2021-04-29 16:25 ` [Bug debug/100303] [11 " rsandifo at gcc dot gnu.org
@ 2021-07-28 7:06 ` rguenth at gcc dot gnu.org
2021-09-20 6:54 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-28 7:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100303
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.2 |11.3
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.2 is being released, retargeting bugs to GCC 11.3
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/100303] [11 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer
2021-04-28 5:17 [Bug debug/100303] New: [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer zsojka at seznam dot cz
` (5 preceding siblings ...)
2021-07-28 7:06 ` rguenth at gcc dot gnu.org
@ 2021-09-20 6:54 ` pinskia at gcc dot gnu.org
2022-04-21 7:49 ` rguenth at gcc dot gnu.org
2023-05-29 10:04 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-20 6:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100303
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=100304
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 100304 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/100303] [11 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer
2021-04-28 5:17 [Bug debug/100303] New: [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer zsojka at seznam dot cz
` (6 preceding siblings ...)
2021-09-20 6:54 ` pinskia at gcc dot gnu.org
@ 2022-04-21 7:49 ` rguenth at gcc dot gnu.org
2023-05-29 10:04 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-21 7:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100303
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.3 |11.4
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.3 is being released, retargeting bugs to GCC 11.4.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/100303] [11 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer
2021-04-28 5:17 [Bug debug/100303] New: [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer zsojka at seznam dot cz
` (7 preceding siblings ...)
2022-04-21 7:49 ` rguenth at gcc dot gnu.org
@ 2023-05-29 10:04 ` jakub at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100303
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.4 |11.5
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-05-29 10:04 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 5:17 [Bug debug/100303] New: [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer zsojka at seznam dot cz
2021-04-28 6:26 ` [Bug debug/100303] " rguenth at gcc dot gnu.org
2021-04-28 9:47 ` jakub at gcc dot gnu.org
2021-04-28 12:36 ` rsandifo at gcc dot gnu.org
2021-04-29 16:25 ` cvs-commit at gcc dot gnu.org
2021-04-29 16:25 ` [Bug debug/100303] [11 " rsandifo at gcc dot gnu.org
2021-07-28 7:06 ` rguenth at gcc dot gnu.org
2021-09-20 6:54 ` pinskia at gcc dot gnu.org
2022-04-21 7:49 ` rguenth at gcc dot gnu.org
2023-05-29 10:04 ` jakub at gcc dot gnu.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).