public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/59386] New: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode
@ 2013-12-04 17:51 su at cs dot ucdavis.edu
2013-12-04 18:28 ` [Bug tree-optimization/59386] [4.9 Regression] " mpolacek at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-12-04 17:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59386
Bug ID: 59386
Summary: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu
in 64-bit mode
Product: gcc
Version: 4.9.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
-O2 and -O3 on x86_64-linux-gnu in 64-bit mode (but not in 32-bit mode).
It is a regression from 4.8.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/4.9.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 4.9.0 20131204 (experimental) [trunk revision 205660] (GCC)
$
$ gcc-trunk -m64 -Os -c small.c
$ gcc-4.8 -m64 -O2 -c small.c
$ gcc-trunk -m32 -O2 -c small.c
$
$ gcc-trunk -m64 -O2 -c small.c
small.c: In function ‘fn2’:
small.c:31:1: error: incorrect sharing of tree nodes
}
^
a.f2
# .MEM_11 = VDEF <.MEM_10>
a.f2 = D.1782;
small.c:31:1: internal compiler error: verify_gimple failed
0x9d3821 verify_gimple_in_cfg(function*)
../../gcc-trunk/gcc/tree-cfg.c:4848
0x8fa874 execute_function_todo
../../gcc-trunk/gcc/passes.c:1843
0x8fb273 execute_todo
../../gcc-trunk/gcc/passes.c:1877
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.
$
---------------------------
struct S0
{
int f0;
};
struct S1
{
int f1;
struct S0 f2;
} c;
int b;
struct S0
fn1 ()
{
struct S1 d;
if (b)
for (; c.f1;)
;
else
return d.f2;
}
struct S0
fn2 ()
{
struct S1 a;
a.f2 = fn1 ();
return a.f2;
}
>From gcc-bugs-return-436655-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Dec 04 18:02:15 2013
Return-Path: <gcc-bugs-return-436655-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 13152 invoked by alias); 4 Dec 2013 18:02:15 -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 10180 invoked by uid 55); 4 Dec 2013 18:00:36 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59268] [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in a virtual function
Date: Wed, 04 Dec 2013 18:02:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.7.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-59268-4-cIGtQ0G6Op@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59268-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59268-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: 2013-12/txt/msg00310.txt.bz2
Content-length: 542
http://gcc.gnu.org/bugzilla/show_bug.cgi?idY268
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Dec 4 18:00:28 2013
New Revision: 205674
URL: http://gcc.gnu.org/viewcvs?rev 5674&root=gcc&view=rev
Log:
PR c++/59268
* pt.c (tsubst_copy_and_build): Handle POINTER_PLUS_EXPR.
* g++.dg/cpp0x/constexpr-template6.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/59386] [4.9 Regression] ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode
2013-12-04 17:51 [Bug tree-optimization/59386] New: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode su at cs dot ucdavis.edu
@ 2013-12-04 18:28 ` mpolacek at gcc dot gnu.org
2013-12-10 17:08 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-12-04 18:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59386
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-12-04
CC| |mpolacek at gcc dot gnu.org
Known to work| |4.8.2
Target Milestone|--- |4.9.0
Summary|ICE on valid code at -O2 |[4.9 Regression] ICE on
|and -O3 on x86_64-linux-gnu |valid code at -O2 and -O3
|in 64-bit mode |on x86_64-linux-gnu in
| |64-bit mode
Ever confirmed|0 |1
Known to fail| |4.9.0
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/59386] [4.9 Regression] ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode
2013-12-04 17:51 [Bug tree-optimization/59386] New: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode su at cs dot ucdavis.edu
2013-12-04 18:28 ` [Bug tree-optimization/59386] [4.9 Regression] " mpolacek at gcc dot gnu.org
@ 2013-12-10 17:08 ` jakub at gcc dot gnu.org
2013-12-11 9:18 ` jakub at gcc dot gnu.org
2013-12-11 9:20 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-10 17:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59386
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jakub at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 31411
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31411&action=edit
gcc49-pr59386.patch
Untested fix.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/59386] [4.9 Regression] ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode
2013-12-04 17:51 [Bug tree-optimization/59386] New: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode su at cs dot ucdavis.edu
2013-12-04 18:28 ` [Bug tree-optimization/59386] [4.9 Regression] " mpolacek at gcc dot gnu.org
2013-12-10 17:08 ` jakub at gcc dot gnu.org
@ 2013-12-11 9:18 ` jakub at gcc dot gnu.org
2013-12-11 9:20 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-11 9:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59386
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Dec 11 09:18:33 2013
New Revision: 205883
URL: http://gcc.gnu.org/viewcvs?rev=205883&root=gcc&view=rev
Log:
PR tree-optimization/59386
* tree-inline.c (remap_gimple_stmt): If not id->do_not_unshare,
unshare_expr (id->retval) before passing it to gimple_build_assign.
* gcc.c-torture/compile/pr59386.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr59386.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-inline.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/59386] [4.9 Regression] ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode
2013-12-04 17:51 [Bug tree-optimization/59386] New: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode su at cs dot ucdavis.edu
` (2 preceding siblings ...)
2013-12-11 9:18 ` jakub at gcc dot gnu.org
@ 2013-12-11 9:20 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-11 9:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59386
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-12-11 9:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-04 17:51 [Bug tree-optimization/59386] New: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in 64-bit mode su at cs dot ucdavis.edu
2013-12-04 18:28 ` [Bug tree-optimization/59386] [4.9 Regression] " mpolacek at gcc dot gnu.org
2013-12-10 17:08 ` jakub at gcc dot gnu.org
2013-12-11 9:18 ` jakub at gcc dot gnu.org
2013-12-11 9:20 ` jakub 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).