public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/66794] New: ICE at -O2 and -O3 on x86_64-linux-gnu
@ 2015-07-07 21:45 su at cs dot ucdavis.edu
2015-07-08 8:04 ` [Bug tree-optimization/66794] [6 Regression] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-07-07 21:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66794
Bug ID: 66794
Summary: ICE at -O2 and -O3 on x86_64-linux-gnu
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
Target Milestone: ---
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 5.1.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/6.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 6.0.0 20150707 (experimental) [trunk revision 225501] (GCC)
$
$ gcc-trunk -Os -c small.c
small.c: In function ‘fn1’:
small.c:18:10: warning: function returns address of local variable
[-Wreturn-local-addr]
return *c;
^
small.c:12:7: note: declared here
int f, **g = &b;
^
$ gcc-5.1 -O2 -c small.c
small.c: In function ‘fn1’:
small.c:18:10: warning: function may return address of local variable
[-Wreturn-local-addr]
return *c;
^
small.c:12:7: note: declared here
int f, **g = &b;
^
$
$ gcc-trunk -O2 -c small.c
small.c: In function ‘fn1’:
small.c:18:10: warning: function may return address of local variable
[-Wreturn-local-addr]
return *c;
^
small.c:12:7: note: declared here
int f, **g = &b;
^
small.c:10:1: error: dominator of 4 status unknown
fn1 ()
^
small.c:10:1: internal compiler error: Segmentation fault
0xbb296f crash_signal
../../gcc-trunk/gcc/toplev.c:360
0x76ac43 verify_dominators(cdi_direction)
../../gcc-trunk/gcc/dominance.c:1059
0x76aed7 calculate_dominance_info(cdi_direction)
../../gcc-trunk/gcc/dominance.c:685
0xcd85e4 execute
../../gcc-trunk/gcc/tree-ssa-dse.c:404
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.
$
------------------------------
int a, *b, e;
static int **c = &b;
struct
{
int f0;
} d;
int *
fn1 ()
{
int f, **g = &b;
e = a;
for (; a;)
for (; d.f0; d.f0++)
;
*g = &f;
return *c;
}
>From gcc-bugs-return-491687-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jul 07 21:59:43 2015
Return-Path: <gcc-bugs-return-491687-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 64059 invoked by alias); 7 Jul 2015 21:59:42 -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 64002 invoked by uid 48); 7 Jul 2015 21:59:38 -0000
From: "marcus at jet dot franken.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/66782] Unable to run 64-bit wine after MS->SYSV register changes
Date: Tue, 07 Jul 2015 21:59:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: marcus at jet dot franken.de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
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:
Message-ID: <bug-66782-4-wKRSqQZtlm@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66782-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66782-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-07/txt/msg00577.txt.bz2
Content-length: 215
https://gcc.gnu.org/bugzilla/show_bug.cgi?idf782
--- Comment #4 from marcus at jet dot franken.de ---
(actually not sure this is the same issue that my wine colleagueds are seeing,
but it also a miscompilation)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/66794] [6 Regression] ICE at -O2 and -O3 on x86_64-linux-gnu
2015-07-07 21:45 [Bug tree-optimization/66794] New: ICE at -O2 and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
@ 2015-07-08 8:04 ` rguenth at gcc dot gnu.org
2015-07-08 11:48 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-08 8:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66794
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-07-08
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Target Milestone|--- |6.0
Summary|ICE at -O2 and -O3 on |[6 Regression] ICE at -O2
|x86_64-linux-gnu |and -O3 on x86_64-linux-gnu
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So this means post-dominators are corrupt at then entry to DSE. Usually passes
should always release post-dominators - it seems there is at least one that
fails to do that. isolate-paths in this case. Passes are not good at making
sure
to release post-dom-info when they invalidate it.
The regression is due to extra checking.
Index: gcc/gimple-ssa-isolate-paths.c
===================================================================
--- gcc/gimple-ssa-isolate-paths.c (revision 225504)
+++ gcc/gimple-ssa-isolate-paths.c (working copy)
@@ -501,10 +501,10 @@ gimple_ssa_isolate_erroneous_paths (void
/* We scramble the CFG and loop structures a bit, clean up
appropriately. We really should incrementally update the
loop structures, in theory it shouldn't be that hard. */
+ free_dominance_info (CDI_POST_DOMINATORS);
if (cfg_altered)
{
free_dominance_info (CDI_DOMINATORS);
- free_dominance_info (CDI_POST_DOMINATORS);
loops_state_set (LOOPS_NEED_FIXUP);
return TODO_cleanup_cfg | TODO_update_ssa;
}
fixes it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/66794] [6 Regression] ICE at -O2 and -O3 on x86_64-linux-gnu
2015-07-07 21:45 [Bug tree-optimization/66794] New: ICE at -O2 and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2015-07-08 8:04 ` [Bug tree-optimization/66794] [6 Regression] " rguenth at gcc dot gnu.org
@ 2015-07-08 11:48 ` rguenth at gcc dot gnu.org
2015-07-08 11:51 ` [Bug tree-optimization/66794] [4.9/5 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-08 11:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66794
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Wed Jul 8 11:47:42 2015
New Revision: 225545
URL: https://gcc.gnu.org/viewcvs?rev=225545&root=gcc&view=rev
Log:
2015-07-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/66794
* passes.c (execute_function_todo): Assert that post-dominators
are not computed.
* gimple-ssa-isolate-paths.c (gimple_ssa_isolate_erroneous_paths):
Free post-dominators.
* gcc.dg/torture/pr66794.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr66794.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-ssa-isolate-paths.c
trunk/gcc/passes.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/66794] [4.9/5 Regression] ICE at -O2 and -O3 on x86_64-linux-gnu
2015-07-07 21:45 [Bug tree-optimization/66794] New: ICE at -O2 and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2015-07-08 8:04 ` [Bug tree-optimization/66794] [6 Regression] " rguenth at gcc dot gnu.org
2015-07-08 11:48 ` rguenth at gcc dot gnu.org
@ 2015-07-08 11:51 ` rguenth at gcc dot gnu.org
2015-07-09 7:47 ` rguenth at gcc dot gnu.org
2015-07-10 12:34 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-08 11:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66794
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |6.0
Target Milestone|6.0 |4.9.4
Summary|[6 Regression] ICE at -O2 |[4.9/5 Regression] ICE at
|and -O3 on x86_64-linux-gnu |-O2 and -O3 on
| |x86_64-linux-gnu
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk. The issue is latent on the branches though, possibly using
broken post-dom info.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/66794] [4.9/5 Regression] ICE at -O2 and -O3 on x86_64-linux-gnu
2015-07-07 21:45 [Bug tree-optimization/66794] New: ICE at -O2 and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
` (2 preceding siblings ...)
2015-07-08 11:51 ` [Bug tree-optimization/66794] [4.9/5 " rguenth at gcc dot gnu.org
@ 2015-07-09 7:47 ` rguenth at gcc dot gnu.org
2015-07-10 12:34 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-09 7:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66794
Bug 66794 depends on bug 66807, which changed state.
Bug 66807 Summary: [6 Regression] --enable-libmpx failed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66807
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/66794] [4.9/5 Regression] ICE at -O2 and -O3 on x86_64-linux-gnu
2015-07-07 21:45 [Bug tree-optimization/66794] New: ICE at -O2 and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
` (3 preceding siblings ...)
2015-07-09 7:47 ` rguenth at gcc dot gnu.org
@ 2015-07-10 12:34 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-10 12:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66794
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Fri Jul 10 12:33:28 2015
New Revision: 225671
URL: https://gcc.gnu.org/viewcvs?rev=225671&root=gcc&view=rev
Log:
2015-07-10 Richard Biener <rguenther@suse.de>
Backport from mainline
2015-07-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/66823
* tree-if-conv.c (memrefs_read_or_written_unconditionally): Fix
inverted predicate.
* gcc.dg/vect/pr61194.c: Remove -ftree-loop-if-convert-stores
which should not be necessary. XFAIL.
2015-07-08 Richard Biener <rguenther@suse.de>
PR middle-end/43341
* toplev.c (compile_file): Reset maximum_field_alignment after parsing.
2015-07-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/66794
* gimple-ssa-isolate-paths.c (gimple_ssa_isolate_erroneous_paths):
Free post-dominators.
* gcc.dg/torture/pr66794.c: New testcase.
Added:
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr66794.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/gimple-ssa-isolate-paths.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/testsuite/gcc.dg/vect/pr61194.c
branches/gcc-5-branch/gcc/toplev.c
branches/gcc-5-branch/gcc/tree-if-conv.c
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-07-10 12:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-07 21:45 [Bug tree-optimization/66794] New: ICE at -O2 and -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2015-07-08 8:04 ` [Bug tree-optimization/66794] [6 Regression] " rguenth at gcc dot gnu.org
2015-07-08 11:48 ` rguenth at gcc dot gnu.org
2015-07-08 11:51 ` [Bug tree-optimization/66794] [4.9/5 " rguenth at gcc dot gnu.org
2015-07-09 7:47 ` rguenth at gcc dot gnu.org
2015-07-10 12:34 ` 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).