public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang
@ 2020-05-13 22:09 slyfox at inbox dot ru
2020-05-13 22:10 ` [Bug tree-optimization/95118] " slyfox at inbox dot ru
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: slyfox at inbox dot ru @ 2020-05-13 22:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95118
Bug ID: 95118
Summary: gcc-10 and master -O3 -fopt-info-vec causes gcc to
hang
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: slyfox at inbox dot ru
Target Milestone: ---
The bug originally reported by Adrien Dessemond as
https://bugs.gentoo.org/722774 where gzip-1.10's ./configure CFLAGS="-O3 -pipe
-march=native -fomit-frame-pointer -fopt-info-vec -mindirect-branch=thunk
-mindirect-branch-register" makes gcc hang.
Minimal reproducer against gcc-10.1.0 anf gcc-master is:
// $ cat bug.c
void a();
void b() {
union {
int c[4];
long double d;
} e = {{0, 0, 4}};
a(e.d);
}
$ /usr/bin/x86_64-pc-linux-gnu-gcc-10.1.0 -o conftest -O3 -fopt-info-vec -c
bug.c
<hung>
Reproducible on the following gcc config against master:
Reading specs from /home/slyfox/dev/git/gcc-native-quick/gcc/specs
COLLECT_GCC=/home/slyfox/dev/git/gcc-native-quick/gcc/xgcc
COLLECT_LTO_WRAPPER=/home/slyfox/dev/git/gcc-native-quick/gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --enable-languages=c,c++ --disable-bootstrap
--with-multilib-list=m64
--prefix=/home/slyfox/dev/git/gcc-native-quick/../gcc-native-quick-installed
--disable-nls --without-isl --disable-libsanitizer --disable-libvtv
--disable-libgomp --disable-libstdcxx-pch --disable-libunwind-exceptions
CFLAGS='-O1 ' CXXFLAGS='-O1 ' --with-sysroot=/usr/x86_64-HEAD-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20200513 (experimental) (GCC)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/95118] gcc-10 and master -O3 -fopt-info-vec causes gcc to hang
2020-05-13 22:09 [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang slyfox at inbox dot ru
@ 2020-05-13 22:10 ` slyfox at inbox dot ru
2020-05-13 22:11 ` slyfox at inbox dot ru
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: slyfox at inbox dot ru @ 2020-05-13 22:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95118
--- Comment #1 from Sergei Trofimovich <slyfox at inbox dot ru> ---
Created attachment 48528
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48528&action=edit
bug.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/95118] gcc-10 and master -O3 -fopt-info-vec causes gcc to hang
2020-05-13 22:09 [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang slyfox at inbox dot ru
2020-05-13 22:10 ` [Bug tree-optimization/95118] " slyfox at inbox dot ru
@ 2020-05-13 22:11 ` slyfox at inbox dot ru
2020-05-13 23:36 ` slyfox at inbox dot ru
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: slyfox at inbox dot ru @ 2020-05-13 22:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95118
--- Comment #2 from Sergei Trofimovich <slyfox at inbox dot ru> ---
Seems to be a regression since gcc-9.3.0.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/95118] gcc-10 and master -O3 -fopt-info-vec causes gcc to hang
2020-05-13 22:09 [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang slyfox at inbox dot ru
2020-05-13 22:10 ` [Bug tree-optimization/95118] " slyfox at inbox dot ru
2020-05-13 22:11 ` slyfox at inbox dot ru
@ 2020-05-13 23:36 ` slyfox at inbox dot ru
2020-05-14 0:15 ` admnd at protonmail dot com
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: slyfox at inbox dot ru @ 2020-05-13 23:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95118
Sergei Trofimovich <slyfox at inbox dot ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #3 from Sergei Trofimovich <slyfox at inbox dot ru> ---
Bisect points to an old revision. Might be a coincidence?
38988cbf9ebaa96fb1e891a46aa063f0c298a2e2 is the first bad commit
commit 38988cbf9ebaa96fb1e891a46aa063f0c298a2e2
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jul 8 07:09:24 2019 +0000
re PR tree-optimization/83518 (Missing optimization: useless instructions
should be dropped)
2019-07-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/83518
* tree-ssa-sccvn.c: Include splay-tree.h.
(struct pd_range, struct pd_data): New.
(struct vn_walk_cb_data): Add data to track partial definitions.
(vn_walk_cb_data::~vn_walk_cb_data): New.
(vn_walk_cb_data::push_partial_def): New.
(pd_tree_alloc, pd_tree_dealloc, pd_range_compare): New.
(vn_reference_lookup_2): When partial defs are registered give up.
(vn_reference_lookup_3): Track partial defs for memset and
constructor zeroing and for defs from constants.
* gcc.dg/tree-ssa/ssa-fre-73.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-74.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-75.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-76.c: Likewise.
* g++.dg/tree-ssa/pr83518.C: Likewise.
From-SVN: r273194
gcc/ChangeLog | 13 +
gcc/testsuite/ChangeLog | 9 +
gcc/testsuite/g++.dg/tree-ssa/pr83518.C | 27 ++
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-73.c | 14 ++
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-74.c | 16 ++
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-75.c | 34 +++
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-76.c | 16 ++
gcc/tree-ssa-sccvn.c | 389 +++++++++++++++++++++++++----
8 files changed, 469 insertions(+), 49 deletions(-)
create mode 100644 gcc/testsuite/g++.dg/tree-ssa/pr83518.C
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-73.c
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-74.c
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-75.c
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-76.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/95118] gcc-10 and master -O3 -fopt-info-vec causes gcc to hang
2020-05-13 22:09 [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang slyfox at inbox dot ru
` (2 preceding siblings ...)
2020-05-13 23:36 ` slyfox at inbox dot ru
@ 2020-05-14 0:15 ` admnd at protonmail dot com
2020-05-14 6:50 ` [Bug tree-optimization/95118] [10/11 Regression] " rguenth at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: admnd at protonmail dot com @ 2020-05-14 0:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95118
--- Comment #4 from Adrien Dessemond <admnd at protonmail dot com> ---
The hang also happens with "-O2 -ftree-vectorize -fopt-info-vec"
I confirm that removing "-fopt-info-vec" avoids the hang.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/95118] [10/11 Regression] gcc-10 and master -O3 -fopt-info-vec causes gcc to hang
2020-05-13 22:09 [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang slyfox at inbox dot ru
` (3 preceding siblings ...)
2020-05-14 0:15 ` admnd at protonmail dot com
@ 2020-05-14 6:50 ` rguenth at gcc dot gnu.org
2020-05-14 8:51 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-14 6:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95118
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Keywords| |compile-time-hog
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Target Milestone|--- |10.2
Summary|gcc-10 and master -O3 |[10/11 Regression] gcc-10
|-fopt-info-vec causes gcc |and master -O3
|to hang |-fopt-info-vec causes gcc
| |to hang
Ever confirmed|0 |1
Last reconfirmed| |2020-05-14
Known to work| |9.3.0
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
On the GCC 10 branch I see it not returning from
(gdb) fin
Run till exit from #0 0x000000000107148d in real_to_decimal_for_mode (
str=0x7fffffffcd60 "\200", r_orig=0x7fffffffcd40, buf_size=100, digits=57,
crop_trailing_zeros=1, mode=E_VOIDmode)
at /space/rguenther/src/gcc-10-branch/gcc/real.c:1718
we're in this loop:
while (1)
{
/* Stop if we'd shift bits off the bottom. */
if (v.sig[0] & 7)
break;
do_multiply (&u, &v, ten);
/* Stop if we're now >= 1. */
if (REAL_EXP (&u) > 0)
break;
v = u;
dec_exp -= 1;
}
(gdb) p u
$1 = {cl = 0, decimal = 0, sign = 0, signalling = 0, canonical = 0, uexp = 0,
sig = {0, 0, 0}}
and the original REAL_VALUE_TYPE is
(gdb) p *r_orig
$4 = {cl = 1, decimal = 0, sign = 0, signalling = 0, canonical = 0,
uexp = 67092486, sig = {0, 0, 0}}
so it's simply a weird not normalized constant zero ...
I have a patch to paper over this in real_to_decimal_for_mode which then
prints
a (0.0e-8191);
for the specific number.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/95118] [10/11 Regression] gcc-10 and master -O3 -fopt-info-vec causes gcc to hang
2020-05-13 22:09 [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang slyfox at inbox dot ru
` (4 preceding siblings ...)
2020-05-14 6:50 ` [Bug tree-optimization/95118] [10/11 Regression] " rguenth at gcc dot gnu.org
@ 2020-05-14 8:51 ` cvs-commit at gcc dot gnu.org
2020-05-14 8:51 ` [Bug tree-optimization/95118] [10 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-14 8:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95118
--- 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:568c985113b29574c4e25e1a016475668fc17c28
commit r11-383-g568c985113b29574c4e25e1a016475668fc17c28
Author: Richard Biener <rguenther@suse.de>
Date: Thu May 14 08:53:03 2020 +0200
middle-end/95118 - fix printing of denormal zero
This fixes printing a REAL_CST generated from value-numbering
punning some bits to a real which turns out as zero with big
negative exponent. This causes the loop in real_to_decimal_for_mode to
never terminate.
2020-05-14 Richard Biener <rguenther@suse.de>
PR middle-end/95118
* real.c (real_to_decimal_for_mode): Make sure we handle
a zero with nonzero exponent.
* gcc.dg/pr95118.c: New testcase.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/95118] [10 Regression] gcc-10 and master -O3 -fopt-info-vec causes gcc to hang
2020-05-13 22:09 [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang slyfox at inbox dot ru
` (5 preceding siblings ...)
2020-05-14 8:51 ` cvs-commit at gcc dot gnu.org
@ 2020-05-14 8:51 ` rguenth at gcc dot gnu.org
2020-06-23 11:06 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-14 8:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95118
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.0
Summary|[10/11 Regression] gcc-10 |[10 Regression] gcc-10 and
|and master -O3 |master -O3 -fopt-info-vec
|-fopt-info-vec causes gcc |causes gcc to hang
|to hang |
Known to fail| |10.1.0
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/95118] [10 Regression] gcc-10 and master -O3 -fopt-info-vec causes gcc to hang
2020-05-13 22:09 [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang slyfox at inbox dot ru
` (6 preceding siblings ...)
2020-05-14 8:51 ` [Bug tree-optimization/95118] [10 " rguenth at gcc dot gnu.org
@ 2020-06-23 11:06 ` cvs-commit at gcc dot gnu.org
2020-06-23 11:07 ` rguenth at gcc dot gnu.org
2021-12-23 6:49 ` pinskia at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-23 11:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95118
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:fe19d514ae915163b49fa344703ecfa1778a44d8
commit r10-8349-gfe19d514ae915163b49fa344703ecfa1778a44d8
Author: Richard Biener <rguenther@suse.de>
Date: Thu May 14 08:53:03 2020 +0200
middle-end/95118 - fix printing of denormal zero
This fixes printing a REAL_CST generated from value-numbering
punning some bits to a real which turns out as zero with big
negative exponent. This causes the loop in real_to_decimal_for_mode to
never terminate.
2020-05-14 Richard Biener <rguenther@suse.de>
PR middle-end/95118
* real.c (real_to_decimal_for_mode): Make sure we handle
a zero with nonzero exponent.
* gcc.dg/pr95118.c: New testcase.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/95118] [10 Regression] gcc-10 and master -O3 -fopt-info-vec causes gcc to hang
2020-05-13 22:09 [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang slyfox at inbox dot ru
` (7 preceding siblings ...)
2020-06-23 11:06 ` cvs-commit at gcc dot gnu.org
@ 2020-06-23 11:07 ` rguenth at gcc dot gnu.org
2021-12-23 6:49 ` pinskia at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-23 11:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95118
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work| |10.1.1
Resolution|--- |FIXED
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/95118] [10 Regression] gcc-10 and master -O3 -fopt-info-vec causes gcc to hang
2020-05-13 22:09 [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang slyfox at inbox dot ru
` (8 preceding siblings ...)
2020-06-23 11:07 ` rguenth at gcc dot gnu.org
@ 2021-12-23 6:49 ` pinskia at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-23 6:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95118
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ch3root at openwall dot com
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 71533 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-12-23 6:49 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 22:09 [Bug tree-optimization/95118] New: gcc-10 and master -O3 -fopt-info-vec causes gcc to hang slyfox at inbox dot ru
2020-05-13 22:10 ` [Bug tree-optimization/95118] " slyfox at inbox dot ru
2020-05-13 22:11 ` slyfox at inbox dot ru
2020-05-13 23:36 ` slyfox at inbox dot ru
2020-05-14 0:15 ` admnd at protonmail dot com
2020-05-14 6:50 ` [Bug tree-optimization/95118] [10/11 Regression] " rguenth at gcc dot gnu.org
2020-05-14 8:51 ` cvs-commit at gcc dot gnu.org
2020-05-14 8:51 ` [Bug tree-optimization/95118] [10 " rguenth at gcc dot gnu.org
2020-06-23 11:06 ` cvs-commit at gcc dot gnu.org
2020-06-23 11:07 ` rguenth at gcc dot gnu.org
2021-12-23 6:49 ` pinskia 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).