public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/64493] New: ICE at -O3 on x86_64-linux-gnu
@ 2015-01-04 23:23 su at cs dot ucdavis.edu
2015-01-05 8:57 ` [Bug tree-optimization/64493] [4.8/4.9/5 Regression] " jakub at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-01-04 23:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64493
Bug ID: 64493
Summary: ICE at -O3 on x86_64-linux-gnu
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
The following code causes an ICE when compiled with the current gcc trunk at
-O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes.
It is a regression from 4.9.x.
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 5.0.0 20150104 (experimental) [trunk revision 219172] (GCC)
$
$ gcc-trunk -O2 small.c; a.out
$ gcc-4.9 -O3 small.c; a.out
$
$ gcc-trunk -O3 small.c
small.c: In function ‘main’:
small.c:6:1: error: definition in block 13 does not dominate use in block 12
main ()
^
for SSA_NAME: vect_c.29_53 in statement:
vect_e.35_1 = vect_c.29_53 | vect_e.35_18;
small.c:6:1: internal compiler error: verify_ssa failed
0xc8c6b1 verify_ssa(bool, bool)
../../gcc-trunk/gcc/tree-ssa.c:1062
0x9daae5 execute_function_todo
../../gcc-trunk/gcc/passes.c:1947
0x9db523 execute_todo
../../gcc-trunk/gcc/passes.c:1997
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$
------------------------------
#include <assert.h>
int a, b, c, d, e, f, g, h;
int
main ()
{
for (; a; a--)
for (d = 1; d <= 0; d++)
for (; d;)
if (h)
{
assert (g);
assert (0);
}
for (f = 4; f; f--)
{
for (b = 0; b < 2; b++)
c |= 1;
e |= c;
}
return 0;
}
>From gcc-bugs-return-472194-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jan 04 23:40:08 2015
Return-Path: <gcc-bugs-return-472194-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 10654 invoked by alias); 4 Jan 2015 23:40:07 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 10584 invoked by uid 48); 4 Jan 2015 23:40:03 -0000
From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/63251] tsan: corrupted shadow stack
Date: Sun, 04 Jan 2015 23:40:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: bernd.edlinger at hotmail dot de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-63251-4-mlbvmBukHk@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63251-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63251-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-01/txt/msg00188.txt.bz2
Content-length: 496
https://gcc.gnu.org/bugzilla/show_bug.cgi?idc251
Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bernd.edlinger at hotmail dot de
--- Comment #1 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Dmitry,
we fixed that one, but the latest LLVM tree needs still to be merged to GCC.
Bernd.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/64493] [4.8/4.9/5 Regression] ICE at -O3 on x86_64-linux-gnu
2015-01-04 23:23 [Bug tree-optimization/64493] New: ICE at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
@ 2015-01-05 8:57 ` jakub at gcc dot gnu.org
2015-01-13 11:42 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-05 8:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64493
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-01-05
CC| |jakub at gcc dot gnu.org
Target Milestone|--- |4.8.5
Summary|ICE at -O3 on |[4.8/4.9/5 Regression] ICE
|x86_64-linux-gnu |at -O3 on x86_64-linux-gnu
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
To avoid the #include, I've used
int a, b, c, d, e, f, g, h;
int
main ()
{
for (; a; a--)
for (d = 1; d <= 0; d++)
for (; d;)
if (h)
{
if (!g) __builtin_abort ();
if (!0) __builtin_abort ();
}
for (f = 4; f; f--)
{
for (b = 0; b < 2; b++)
c |= 1;
e |= c;
}
return 0;
}
and that started to ICE with r181990.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/64493] [4.8/4.9/5 Regression] ICE at -O3 on x86_64-linux-gnu
2015-01-04 23:23 [Bug tree-optimization/64493] New: ICE at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2015-01-05 8:57 ` [Bug tree-optimization/64493] [4.8/4.9/5 Regression] " jakub at gcc dot gnu.org
2015-01-13 11:42 ` rguenth at gcc dot gnu.org
@ 2015-01-13 11:42 ` rguenth at gcc dot gnu.org
2015-01-13 12:22 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-01-13 11:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64493
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/64493] [4.8/4.9/5 Regression] ICE at -O3 on x86_64-linux-gnu
2015-01-04 23:23 [Bug tree-optimization/64493] New: ICE at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2015-01-05 8:57 ` [Bug tree-optimization/64493] [4.8/4.9/5 Regression] " jakub at gcc dot gnu.org
@ 2015-01-13 11:42 ` rguenth at gcc dot gnu.org
2015-01-13 11:42 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-01-13 11:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64493
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/64493] [4.8/4.9/5 Regression] ICE at -O3 on x86_64-linux-gnu
2015-01-04 23:23 [Bug tree-optimization/64493] New: ICE at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
` (2 preceding siblings ...)
2015-01-13 11:42 ` rguenth at gcc dot gnu.org
@ 2015-01-13 12:22 ` rguenth at gcc dot gnu.org
2015-01-14 8:33 ` [Bug tree-optimization/64493] [4.8/4.9 " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-01-13 12:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64493
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I tried to make a runtime testcase that tests for proper vectorization but
all vectorized code ends up being dead. Nevertheless the following fixes
the ICE:
Index: gcc/tree-vect-loop.c
===================================================================
--- gcc/tree-vect-loop.c (revision 219520)
+++ gcc/tree-vect-loop.c (working copy)
@@ -4580,7 +4580,10 @@ vect_finalize_reduction:
&& !STMT_VINFO_LIVE_P (exit_phi_vinfo))
|| double_reduc);
- STMT_VINFO_VEC_STMT (exit_phi_vinfo) = epilog_stmt;
+ if (double_reduc)
+ STMT_VINFO_VEC_STMT (exit_phi_vinfo) = inner_phi;
+ else
+ STMT_VINFO_VEC_STMT (exit_phi_vinfo) = epilog_stmt;
if (!double_reduc
|| STMT_VINFO_DEF_TYPE (exit_phi_vinfo)
!= vect_double_reduction_def)
and the generated code looks reasonable. I think we don't really support
the case where the inner reduction result is used in the outer loop (but
in !relevant stmts which end up dead).
Well. Not 100% sure.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/64493] [4.8/4.9 Regression] ICE at -O3 on x86_64-linux-gnu
2015-01-04 23:23 [Bug tree-optimization/64493] New: ICE at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
` (3 preceding siblings ...)
2015-01-13 12:22 ` rguenth at gcc dot gnu.org
@ 2015-01-14 8:33 ` rguenth at gcc dot gnu.org
2015-01-14 8:33 ` [Bug tree-optimization/64493] [4.8/4.9/5 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-01-14 8:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64493
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Known to work| |5.0
Summary|[4.8/4.9/5 Regression] ICE |[4.8/4.9 Regression] ICE at
|at -O3 on x86_64-linux-gnu |-O3 on x86_64-linux-gnu
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/64493] [4.8/4.9/5 Regression] ICE at -O3 on x86_64-linux-gnu
2015-01-04 23:23 [Bug tree-optimization/64493] New: ICE at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
` (4 preceding siblings ...)
2015-01-14 8:33 ` [Bug tree-optimization/64493] [4.8/4.9 " rguenth at gcc dot gnu.org
@ 2015-01-14 8:33 ` rguenth at gcc dot gnu.org
2015-02-19 14:14 ` [Bug tree-optimization/64493] [4.8/4.9 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-01-14 8:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64493
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Wed Jan 14 08:32:18 2015
New Revision: 219579
URL: https://gcc.gnu.org/viewcvs?rev=219579&root=gcc&view=rev
Log:
2015-01-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/64493
PR tree-optimization/64495
* tree-vect-loop.c (vect_finalize_reduction): For double-reductions
assign the proper vectorized PHI to the inner loop exit PHIs.
* gcc.dg/vect/pr64493.c: New testcase.
* gcc.dg/vect/pr64495.c: Likewise.
Added:
trunk/gcc/testsuite/gcc.dg/vect/pr64493.c
trunk/gcc/testsuite/gcc.dg/vect/pr64495.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-loop.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/64493] [4.8/4.9 Regression] ICE at -O3 on x86_64-linux-gnu
2015-01-04 23:23 [Bug tree-optimization/64493] New: ICE at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
` (5 preceding siblings ...)
2015-01-14 8:33 ` [Bug tree-optimization/64493] [4.8/4.9/5 " rguenth at gcc dot gnu.org
@ 2015-02-19 14:14 ` rguenth at gcc dot gnu.org
2015-02-24 14:27 ` [Bug tree-optimization/64493] [4.8 " rguenth at gcc dot gnu.org
2015-02-24 14:33 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-19 14:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64493
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Feb 19 14:13:16 2015
New Revision: 220815
URL: https://gcc.gnu.org/viewcvs?rev=220815&root=gcc&view=rev
Log:
2015-02-19 Richard Biener <rguenther@suse.de>
Backport from mainline
2014-12-09 Richard Biener <rguenther@suse.de>
PR middle-end/64199
* fold-const.c (fold_binary_loc): Use TREE_OVERFLOW_P.
* gcc.dg/torture/pr64199.c: New testcase.
2015-01-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/64493
PR tree-optimization/64495
* tree-vect-loop.c (vect_finalize_reduction): For double-reductions
assign the proper vectorized PHI to the inner loop exit PHIs.
* gcc.dg/vect/pr64493.c: New testcase.
* gcc.dg/vect/pr64495.c: Likewise.
2015-01-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/56273
PR tree-optimization/59124
PR tree-optimization/64277
* tree-vrp.c (vrp_finalize): Emit array-bound warnings only
from the first VRP pass.
* g++.dg/warn/Warray-bounds-6.C: New testcase.
* gcc.dg/Warray-bounds-12.c: Likewise.
* gcc.dg/Warray-bounds-13.c: Likewise.
2015-02-19 Richard Biener <rguenther@suse.de>
Backport from mainline
2015-01-15 Richard Biener <rguenther@suse.de>
PR middle-end/64365
* tree-data-ref.c (dr_analyze_indices): Make sure that accesses
for MEM_REF access functions with the same base can never partially
overlap.
* gcc.dg/torture/pr64365.c: New testcase.
Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/warn/Warray-bounds-6.C
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/Warray-bounds-12.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/Warray-bounds-13.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64199.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64365.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/vect/pr64493.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/vect/pr64495.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/fold-const.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/tree-data-ref.c
branches/gcc-4_9-branch/gcc/tree-vect-loop.c
branches/gcc-4_9-branch/gcc/tree-vrp.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/64493] [4.8 Regression] ICE at -O3 on x86_64-linux-gnu
2015-01-04 23:23 [Bug tree-optimization/64493] New: ICE at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
` (6 preceding siblings ...)
2015-02-19 14:14 ` [Bug tree-optimization/64493] [4.8/4.9 " rguenth at gcc dot gnu.org
@ 2015-02-24 14:27 ` rguenth at gcc dot gnu.org
2015-02-24 14:33 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-24 14:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64493
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Tue Feb 24 14:05:46 2015
New Revision: 220940
URL: https://gcc.gnu.org/viewcvs?rev=220940&root=gcc&view=rev
Log:
2015-02-24 Richard Biener <rguenther@suse.de>
Backport from mainline
2014-12-09 Richard Biener <rguenther@suse.de>
PR middle-end/64199
* fold-const.c (fold_binary_loc): Use TREE_OVERFLOW_P.
* gcc.dg/torture/pr64199.c: New testcase.
2015-01-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/64493
PR tree-optimization/64495
* tree-vect-loop.c (vect_finalize_reduction): For double-reductions
assign the proper vectorized PHI to the inner loop exit PHIs.
* gcc.dg/vect/pr64493.c: New testcase.
* gcc.dg/vect/pr64495.c: Likewise.
Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr64199.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/vect/pr64493.c
branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/vect/pr64495.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/fold-const.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/tree-vect-loop.c
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/64493] [4.8 Regression] ICE at -O3 on x86_64-linux-gnu
2015-01-04 23:23 [Bug tree-optimization/64493] New: ICE at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
` (7 preceding siblings ...)
2015-02-24 14:27 ` [Bug tree-optimization/64493] [4.8 " rguenth at gcc dot gnu.org
@ 2015-02-24 14:33 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-24 14:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64493
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work| |4.8.5
Resolution|--- |FIXED
Known to fail| |4.8.4
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-02-24 14:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-04 23:23 [Bug tree-optimization/64493] New: ICE at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2015-01-05 8:57 ` [Bug tree-optimization/64493] [4.8/4.9/5 Regression] " jakub at gcc dot gnu.org
2015-01-13 11:42 ` rguenth at gcc dot gnu.org
2015-01-13 11:42 ` rguenth at gcc dot gnu.org
2015-01-13 12:22 ` rguenth at gcc dot gnu.org
2015-01-14 8:33 ` [Bug tree-optimization/64493] [4.8/4.9 " rguenth at gcc dot gnu.org
2015-01-14 8:33 ` [Bug tree-optimization/64493] [4.8/4.9/5 " rguenth at gcc dot gnu.org
2015-02-19 14:14 ` [Bug tree-optimization/64493] [4.8/4.9 " rguenth at gcc dot gnu.org
2015-02-24 14:27 ` [Bug tree-optimization/64493] [4.8 " rguenth at gcc dot gnu.org
2015-02-24 14:33 ` 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).