public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/57081] New: Segmentation fault in simple_iv (tree-scalar-evolution.c:3151)
@ 2013-04-26 11:40 antoine.balestrat at gmail dot com
2013-04-26 12:00 ` [Bug tree-optimization/57081] [4.9 Regression] " rguenth at gcc dot gnu.org
2013-04-29 9:09 ` rguenth at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: antoine.balestrat at gmail dot com @ 2013-04-26 11:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57081
Bug #: 57081
Summary: Segmentation fault in simple_iv
(tree-scalar-evolution.c:3151)
Classification: Unclassified
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: antoine.balestrat@gmail.com
Using GCC 4.9.0 as of 20130426 :
$ cat seg.c
int a;
void f(void)
{
int b;
if(0)
lbl:
goto lbl;
if(b)
{
int p = 0;
goto lbl;
}
a = 0;
while(b++);
goto lbl;
}
$ xgcc -w -O2 seg.c
seg.c: In function ‘f’:
seg.c:20:1: internal compiler error: Segmentation fault
}
^
0x90ba1f crash_signal
../../srcdir/gcc/toplev.c:333
0x9a90c4 simple_iv(loop*, loop*, tree_node*, affine_iv*, bool)
../../srcdir/gcc/tree-scalar-evolution.c:3151
0x86ec0f is_comparison_with_loop_invariant_p
../../srcdir/gcc/predict.c:1084
0x8725ac predict_loops
../../srcdir/gcc/predict.c:1552
0x8725ac tree_estimate_probability()
../../srcdir/gcc/predict.c:2342
0x872f10 tree_estimate_probability_driver
../../srcdir/gcc/predict.c:2379
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.
>From gcc-bugs-return-421016-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Apr 26 11:49:47 2013
Return-Path: <gcc-bugs-return-421016-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 5278 invoked by alias); 26 Apr 2013 11:49:47 -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 5253 invoked by uid 48); 26 Apr 2013 11:49:44 -0000
From: "mikpe at it dot uu.se" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/57080] Invalid optimization (-O2) when doing double -> int conversion (on big endian archs(?))
Date: Fri, 26 Apr 2013 11:49: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-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mikpe at it dot uu.se
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields:
Message-ID: <bug-57080-4-iUY4hXU9YH@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57080-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57080-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg02161.txt.bz2
Content-length: 628
http://gcc.gnu.org/bugzilla/show_bug.cgi?idW080
--- Comment #3 from Mikael Pettersson <mikpe at it dot uu.se> 2013-04-26 11:49:44 UTC ---
Created attachment 29946
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id)946
test case
I can reproduce the issue on m68k: with the attached test case I get 4 on
m68k-linux (big-endian), but 5 on x86_64-linux (little-endian).
I don't see any conversions to char or unsigned, so I don't think PR27394 is
related.
The issue goes away with -ffloat-store on m68k. I haven't analyzed it further.
On the big-endian armv5teb-linux-gnueabi I get 5, but it's soft-fp.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/57081] [4.9 Regression] Segmentation fault in simple_iv (tree-scalar-evolution.c:3151)
2013-04-26 11:40 [Bug tree-optimization/57081] New: Segmentation fault in simple_iv (tree-scalar-evolution.c:3151) antoine.balestrat at gmail dot com
@ 2013-04-26 12:00 ` rguenth at gcc dot gnu.org
2013-04-29 9:09 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-26 12:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57081
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-26 12:00:08 UTC ---
Happens via max_loop_iterations called from finite_loop_p called from DCE.
It expects loop_optimizer_finalize to free them - which is probably a
good assumption. I'll fix it.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/57081] [4.9 Regression] Segmentation fault in simple_iv (tree-scalar-evolution.c:3151)
2013-04-26 11:40 [Bug tree-optimization/57081] New: Segmentation fault in simple_iv (tree-scalar-evolution.c:3151) antoine.balestrat at gmail dot com
2013-04-26 12:00 ` [Bug tree-optimization/57081] [4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-04-29 9:09 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-29 9:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57081
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-29 09:09:28 UTC ---
Author: rguenth
Date: Mon Apr 29 09:09:08 2013
New Revision: 198392
URL: http://gcc.gnu.org/viewcvs?rev=198392&root=gcc&view=rev
Log:
2013-04-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/57081
* loop-init.c: Include tree-flow.h.
(loop_optimizer_finalize): Free number of iteration estimates.
* Makefile.in (loop-init.o): Add $(TREE_FLOW_H) dependency.
* gcc.dg/torture/pr57081.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr57081.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/Makefile.in
trunk/gcc/loop-init.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-29 9:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-26 11:40 [Bug tree-optimization/57081] New: Segmentation fault in simple_iv (tree-scalar-evolution.c:3151) antoine.balestrat at gmail dot com
2013-04-26 12:00 ` [Bug tree-optimization/57081] [4.9 Regression] " rguenth at gcc dot gnu.org
2013-04-29 9:09 ` 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).