public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/67253] New: ICE at -O3 on x86_64-linux-gnu (verify_gimple failed)
@ 2015-08-18 0:48 su at cs dot ucdavis.edu
2015-08-18 7:40 ` [Bug tree-optimization/67253] [6 Regression] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-08-18 0:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67253
Bug ID: 67253
Summary: ICE at -O3 on x86_64-linux-gnu (verify_gimple failed)
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-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-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 20150815 (experimental) [trunk revision 226911] (GCC)
$
$ gcc-trunk -O2 small.c; ./a.out
$ gcc-5.1 -O3 small.c; ./a.out
$
$ gcc-trunk -O3 small.c
small.c: In function ‘fn2.constprop’:
small.c:45:1: error: location references block not in block tree
fn2 (char p1, int p2, int *p3)
^
&c
p3_277 = &c;
small.c:45:1: internal compiler error: verify_gimple failed
0xae9db2 verify_gimple_in_cfg(function*, bool)
../../gcc-trunk/gcc/tree-cfg.c:5101
0x9e35a7 execute_function_todo
../../gcc-trunk/gcc/passes.c:1948
0x9e3e53 execute_todo
../../gcc-trunk/gcc/passes.c:2005
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, c, **d = &a, e, f, **h, i, j, k, l, m, *n, o, **q, r, s;
void fn1 (int p) { }
void
fn3 ()
{
for (; j; j++)
for (; k; k++)
l++;
f++;
}
static int
fn4 (char p1, int *p2)
{
for (; m < 1;)
{
fn1 (q == &p2);
for (; o; o++)
;
n = p2;
return 0;
}
for (;;)
{
for (; s; s++)
b = r;
*d = 0;
}
}
static int *fn2 (char, int, int *);
static int
fn5 ()
{
int *g = &c;
fn3 ();
fn2 (0, 0, g);
return e;
}
static int *
fn2 (char p1, int p2, int *p3)
{
fn4 (0, p3);
fn1 (&p3 == h);
for (; i;)
fn5 ();
fn4 (0, p3);
return *d;
}
int
main ()
{
fn5 ();
return 0;
}
>From gcc-bugs-return-495037-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Aug 18 05:29:36 2015
Return-Path: <gcc-bugs-return-495037-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 10287 invoked by alias); 18 Aug 2015 05:29:35 -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 10264 invoked by uid 48); 18 Aug 2015 05:29:31 -0000
From: "jeff.science at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/67250] gfortran does not faithfully preprocess the way cpp does
Date: Tue, 18 Aug 2015 05:29:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 5.2.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jeff.science at gmail dot com
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: bug_status resolution
Message-ID: <bug-67250-4-57B74QSQPZ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67250-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67250-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-08/txt/msg01179.txt.bz2
Content-length: 761
https://gcc.gnu.org/bugzilla/show_bug.cgi?idg250
Jeff Hammond <jeff.science at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |---
--- Comment #6 from Jeff Hammond <jeff.science at gmail dot com> ---
I want gfortran to behave like cpp, not the other way around. I filed this bug
report against gfortran, not cpp, and I noted my desire to have gfortran behave
like cpp in both the title and original comments.
Please do not close the bug until you have addressed the bug report, and not a
closely related but ultimately opposite issue.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/67253] [6 Regression] ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) 2015-08-18 0:48 [Bug tree-optimization/67253] New: ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) su at cs dot ucdavis.edu @ 2015-08-18 7:40 ` rguenth at gcc dot gnu.org 2015-08-25 13:42 ` mpolacek at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-08-18 7:40 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67253 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-checking, | |ice-on-valid-code Status|UNCONFIRMED |NEW Last reconfirmed| |2015-08-18 Known to work| |5.2.1 Target Milestone|--- |6.0 Summary|ICE at -O3 on |[6 Regression] ICE at -O3 |x86_64-linux-gnu |on x86_64-linux-gnu |(verify_gimple failed) |(verify_gimple failed) Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed, exposed by inlining. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/67253] [6 Regression] ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) 2015-08-18 0:48 [Bug tree-optimization/67253] New: ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) su at cs dot ucdavis.edu 2015-08-18 7:40 ` [Bug tree-optimization/67253] [6 Regression] " rguenth at gcc dot gnu.org @ 2015-08-25 13:42 ` mpolacek at gcc dot gnu.org 2015-09-16 9:27 ` rguenth at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: mpolacek at gcc dot gnu.org @ 2015-08-25 13:42 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67253 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org --- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Started with r222360. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/67253] [6 Regression] ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) 2015-08-18 0:48 [Bug tree-optimization/67253] New: ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) su at cs dot ucdavis.edu 2015-08-18 7:40 ` [Bug tree-optimization/67253] [6 Regression] " rguenth at gcc dot gnu.org 2015-08-25 13:42 ` mpolacek at gcc dot gnu.org @ 2015-09-16 9:27 ` rguenth at gcc dot gnu.org 2015-09-16 9:53 ` rguenth at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-09-16 9:27 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67253 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 #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Mine. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/67253] [6 Regression] ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) 2015-08-18 0:48 [Bug tree-optimization/67253] New: ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) su at cs dot ucdavis.edu ` (2 preceding siblings ...) 2015-09-16 9:27 ` rguenth at gcc dot gnu.org @ 2015-09-16 9:53 ` rguenth at gcc dot gnu.org 2015-09-16 14:28 ` rguenth at gcc dot gnu.org 2015-09-16 14:29 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-09-16 9:53 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67253 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- Ok... so the issue is we have "invalid" tree sharing of &c in both fn4.constprop and fn2.constprop. Correctly without BLOCK on the location. But then we expand fn4.constprop and do expand_gimple_stmt_1 (stmt=<gimple_assign 0x7ffff6a0ac30>) at /space/rguenther/src/svn/trunk/gcc/cfgexpand.c:3592 3592 if (TREE_CLOBBER_P (rhs)) (gdb) l 3587 tree rhs = gimple_assign_rhs1 (assign_stmt); 3588 gcc_assert (get_gimple_rhs_class (gimple_expr_code (stmt)) 3589 == GIMPLE_SINGLE_RHS); 3590 if (gimple_has_location (stmt) && CAN_HAVE_LOCATION_P (rhs)) 3591 SET_EXPR_LOCATION (rhs, gimple_location (stmt)); 3592 if (TREE_CLOBBER_P (rhs)) which sets this invalid location on the shared tree. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/67253] [6 Regression] ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) 2015-08-18 0:48 [Bug tree-optimization/67253] New: ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) su at cs dot ucdavis.edu ` (3 preceding siblings ...) 2015-09-16 9:53 ` rguenth at gcc dot gnu.org @ 2015-09-16 14:28 ` rguenth at gcc dot gnu.org 2015-09-16 14:29 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-09-16 14:28 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67253 --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Wed Sep 16 14:27:52 2015 New Revision: 227826 URL: https://gcc.gnu.org/viewcvs?rev=227826&root=gcc&view=rev Log: 2015-09-16 Richard Biener <rguenther@suse.de> PR middle-end/67253 * cfgexpand.c (expand_gimple_stmt_1): Do not clobber location of possibly shared trees. * gcc.dg/torture/pr67253.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/torture/pr67253.c Modified: trunk/gcc/ChangeLog trunk/gcc/cfgexpand.c trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/67253] [6 Regression] ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) 2015-08-18 0:48 [Bug tree-optimization/67253] New: ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) su at cs dot ucdavis.edu ` (4 preceding siblings ...) 2015-09-16 14:28 ` rguenth at gcc dot gnu.org @ 2015-09-16 14:29 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-09-16 14:29 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67253 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Fixed (but latent elsewhere). ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-09-16 14:29 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-08-18 0:48 [Bug tree-optimization/67253] New: ICE at -O3 on x86_64-linux-gnu (verify_gimple failed) su at cs dot ucdavis.edu 2015-08-18 7:40 ` [Bug tree-optimization/67253] [6 Regression] " rguenth at gcc dot gnu.org 2015-08-25 13:42 ` mpolacek at gcc dot gnu.org 2015-09-16 9:27 ` rguenth at gcc dot gnu.org 2015-09-16 9:53 ` rguenth at gcc dot gnu.org 2015-09-16 14:28 ` rguenth at gcc dot gnu.org 2015-09-16 14:29 ` 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).