public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/103351] New: [12 Regression] '-fcompare-debug' failure (length) at -O2
@ 2021-11-21 21:01 zsojka at seznam dot cz
2021-11-21 22:16 ` [Bug tree-optimization/103351] " pinskia at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2021-11-21 21:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103351
Bug ID: 103351
Summary: [12 Regression] '-fcompare-debug' failure (length) at
-O2
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
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 51845
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51845&action=edit
auto-reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-g++ -O2 -fcompare-debug testcase.C -save-temps
x86_64-pc-linux-gnu-g++: error: testcase.C: '-fcompare-debug' failure (length)
$ x86_64-pc-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-g++
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-5437-20211121132234-g09a4ffb72aa-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-5437-20211121132234-g09a4ffb72aa-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20211121 (experimental) (GCC)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103351] [12 Regression] '-fcompare-debug' failure (length) at -O2
2021-11-21 21:01 [Bug debug/103351] New: [12 Regression] '-fcompare-debug' failure (length) at -O2 zsojka at seznam dot cz
@ 2021-11-21 22:16 ` pinskia at gcc dot gnu.org
2021-11-21 22:18 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-21 22:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103351
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-11-21
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Target Milestone|--- |12.0
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, the first (major) difference shows up in 199t.cddce3.
if (&__str._M_local_buf == _13)
goto <bb 4>; [30.00%]
else
- goto <bb 7>; [70.00%]
+ goto <bb 6>; [70.00%]
<bb 4> [local count: 286689070]:
_1 = &_10->D.4203.name;
if (_1 != __trans_tmp_1_14(D))
- goto <bb 6>; [90.00%]
+ goto <bb 5>; [90.00%]
else
- goto <bb 5>; [10.00%]
-
- <bb 5> [local count: 28668907]:
- goto <bb 9>; [100.00%]
+ goto <bb 8>; [10.00%]
- <bb 6> [local count: 258020162]:
+ <bb 5> [local count: 258020162]:
Trans_NS___cxx11_basic_string<char>::size (_1);
pretmp_16 = __str._M_dataplus._M_p;
goto <bb 9>; [100.00%]
- <bb 7> [local count: 668941172]:
+ <bb 6> [local count: 668941172]:
if (__trans_tmp_2_18(D) != 0)
- goto <bb 8>; [50.00%]
+ goto <bb 7>; [50.00%]
else
goto <bb 9>; [50.00%]
- <bb 8> [local count: 334470586]:
- # DEBUG this => &__str
- # DEBUG __p => &__str._M_local_buf
- # DEBUG INLINE_ENTRY _M_data
+ <bb 7> [local count: 334470586]:
__str._M_dataplus._M_p = &__str._M_local_buf;
- goto <bb 5>; [100.00%]
+
+ <bb 8> [local count: 334470586]:
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103351] [12 Regression] '-fcompare-debug' failure (length) at -O2
2021-11-21 21:01 [Bug debug/103351] New: [12 Regression] '-fcompare-debug' failure (length) at -O2 zsojka at seznam dot cz
2021-11-21 22:16 ` [Bug tree-optimization/103351] " pinskia at gcc dot gnu.org
@ 2021-11-21 22:18 ` pinskia at gcc dot gnu.org
2021-11-22 9:07 ` [Bug tree-optimization/103351] [12 Regression] '-fcompare-debug' failure (length) at -O2 since r12-5301-g045206450386bcd7 marxin at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-21 22:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103351
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> Confirmed, the first (major) difference shows up in 199t.cddce3.
So maybe introduced by r12-5301.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103351] [12 Regression] '-fcompare-debug' failure (length) at -O2 since r12-5301-g045206450386bcd7
2021-11-21 21:01 [Bug debug/103351] New: [12 Regression] '-fcompare-debug' failure (length) at -O2 zsojka at seznam dot cz
2021-11-21 22:16 ` [Bug tree-optimization/103351] " pinskia at gcc dot gnu.org
2021-11-21 22:18 ` pinskia at gcc dot gnu.org
@ 2021-11-22 9:07 ` marxin at gcc dot gnu.org
2021-11-22 9:19 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-22 9:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103351
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
Summary|[12 Regression] |[12 Regression]
|'-fcompare-debug' failure |'-fcompare-debug' failure
|(length) at -O2 |(length) at -O2 since
| |r12-5301-g045206450386bcd7
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-5301-g045206450386bcd7.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103351] [12 Regression] '-fcompare-debug' failure (length) at -O2 since r12-5301-g045206450386bcd7
2021-11-21 21:01 [Bug debug/103351] New: [12 Regression] '-fcompare-debug' failure (length) at -O2 zsojka at seznam dot cz
` (2 preceding siblings ...)
2021-11-22 9:07 ` [Bug tree-optimization/103351] [12 Regression] '-fcompare-debug' failure (length) at -O2 since r12-5301-g045206450386bcd7 marxin at gcc dot gnu.org
@ 2021-11-22 9:19 ` rguenth at gcc dot gnu.org
2021-11-22 10:20 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-22 9:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103351
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103351] [12 Regression] '-fcompare-debug' failure (length) at -O2 since r12-5301-g045206450386bcd7
2021-11-21 21:01 [Bug debug/103351] New: [12 Regression] '-fcompare-debug' failure (length) at -O2 zsojka at seznam dot cz
` (3 preceding siblings ...)
2021-11-22 9:19 ` rguenth at gcc dot gnu.org
@ 2021-11-22 10:20 ` rguenth at gcc dot gnu.org
2021-11-22 11:18 ` cvs-commit at gcc dot gnu.org
2021-11-22 11:18 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-22 10:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103351
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the issue is that iterative_hash_expr of &__str._M_local_buf is not the
same for -g vs. -g0 which results in different ordering of the vector of
PHI arguments in sorted form. First there's missing ordering we can use
based on ->dest_idx which should stabilize the sort somewhat. But then
it might still be that we end up with different basic-block numbers when
there are two clusters of same PHI args and thus two forwarders to be
generated.
In the end this is because we hash in DECL_UID which are not the same here
(2872 vs 2873) which is OK. So for the latter issue not exposed in this
testcase we should order clusters after the first ->dest_idx for example.
Though I'm not sure it is an isssue (but it could also improve stability
of testcases when reducing). I'll try to fixup piecewise.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103351] [12 Regression] '-fcompare-debug' failure (length) at -O2 since r12-5301-g045206450386bcd7
2021-11-21 21:01 [Bug debug/103351] New: [12 Regression] '-fcompare-debug' failure (length) at -O2 zsojka at seznam dot cz
` (4 preceding siblings ...)
2021-11-22 10:20 ` rguenth at gcc dot gnu.org
@ 2021-11-22 11:18 ` cvs-commit at gcc dot gnu.org
2021-11-22 11:18 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-22 11:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103351
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:f456eaf2e0fb3ceb51c641fd348429bf59d215a9
commit r12-5447-gf456eaf2e0fb3ceb51c641fd348429bf59d215a9
Author: Richard Biener <rguenther@suse.de>
Date: Mon Nov 22 11:23:55 2021 +0100
tree-optimization/103351 - avoid compare-debug issue wrt CD-DCE change
This avoids differences in the split edge of a cluster due to different
order of same key PHI args when sorting by sorting after the edge
destination index as second key.
2021-11-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/103351
* tree-ssa-dce.c (sort_phi_args): Sort after e->dest_idx as
second key.
* g++.dg/torture/pr103351.C: New testcase.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103351] [12 Regression] '-fcompare-debug' failure (length) at -O2 since r12-5301-g045206450386bcd7
2021-11-21 21:01 [Bug debug/103351] New: [12 Regression] '-fcompare-debug' failure (length) at -O2 zsojka at seznam dot cz
` (5 preceding siblings ...)
2021-11-22 11:18 ` cvs-commit at gcc dot gnu.org
@ 2021-11-22 11:18 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-22 11:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103351
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-11-22 11:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-21 21:01 [Bug debug/103351] New: [12 Regression] '-fcompare-debug' failure (length) at -O2 zsojka at seznam dot cz
2021-11-21 22:16 ` [Bug tree-optimization/103351] " pinskia at gcc dot gnu.org
2021-11-21 22:18 ` pinskia at gcc dot gnu.org
2021-11-22 9:07 ` [Bug tree-optimization/103351] [12 Regression] '-fcompare-debug' failure (length) at -O2 since r12-5301-g045206450386bcd7 marxin at gcc dot gnu.org
2021-11-22 9:19 ` rguenth at gcc dot gnu.org
2021-11-22 10:20 ` rguenth at gcc dot gnu.org
2021-11-22 11:18 ` cvs-commit at gcc dot gnu.org
2021-11-22 11:18 ` rguenth 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).