public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/56501] New: gcc 4.6 ICE on noreturn function at -Os and above
@ 2013-03-01 18:50 dhazeghi at yahoo dot com
2013-03-03 11:06 ` [Bug tree-optimization/56501] " mikpe at it dot uu.se
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dhazeghi at yahoo dot com @ 2013-03-01 18:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56501
Bug #: 56501
Summary: gcc 4.6 ICE on noreturn function at -Os and above
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dhazeghi@yahoo.com
The following testcase (derived from gzip) triggers an internal compiler error
with gcc 4.6, 4.5 and 4.4 when compiled at -Os or higher on x86_64-linux. The
problem does not occur with 4.7 or newer, or with 4.3 or older.
$ gcc-4.6 --version
gcc-4.6 (GCC) 4.6.3
$ gcc-4.6 -O1 -w small.c
$ gcc-4.6 -Os -w small.c
small.c: In function ‘main’:
small.c:24:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ cat small.c
int a;
void try_help () __attribute__ ((__noreturn__));
void try_help ()
{
}
int main ()
{
switch (a)
{
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
break;
default:
try_help ();
}
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/56501] gcc 4.6 ICE on noreturn function at -Os and above
2013-03-01 18:50 [Bug tree-optimization/56501] New: gcc 4.6 ICE on noreturn function at -Os and above dhazeghi at yahoo dot com
@ 2013-03-03 11:06 ` mikpe at it dot uu.se
2013-03-04 10:45 ` [Bug tree-optimization/56501] [4.6/4.7 Regression] " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mikpe at it dot uu.se @ 2013-03-03 11:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56501
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu.se
--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2013-03-03 11:06:24 UTC ---
The original ICE stopped occurring for 4.7 in r171450, which added an FRE pass
after early SRA. From that point on it reproduces with -Os -fno-tree-free. It
then stopped again for 4.8 in r186901, Steven Bosscher's "Simplify
tree-switch-conversion.c a bit - prep work for gimple switch lowering" patch.
The ICE in 4.7 occurs because tree-switch-conversion.c:check_process_case calls
single_succ on a bb that has NULL succs, leading to a SEGV in
VEC_edge_base_index.
The patch in r186901 doesn't apply at all to 4.7, and I don't see any obvious
bug fix in it that could be cherry-picked and applied to 4.7.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/56501] [4.6/4.7 Regression] gcc 4.6 ICE on noreturn function at -Os and above
2013-03-01 18:50 [Bug tree-optimization/56501] New: gcc 4.6 ICE on noreturn function at -Os and above dhazeghi at yahoo dot com
2013-03-03 11:06 ` [Bug tree-optimization/56501] " mikpe at it dot uu.se
@ 2013-03-04 10:45 ` rguenth at gcc dot gnu.org
2013-04-03 10:10 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-03-04 10:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56501
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jamborm at gcc dot gnu.org
Target Milestone|--- |4.6.4
Summary|gcc 4.6 ICE on noreturn |[4.6/4.7 Regression] gcc
|function at -Os and above |4.6 ICE on noreturn
| |function at -Os and above
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-04 10:44:42 UTC ---
Which makes it a 4.6/4.7 regression.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/56501] [4.6/4.7 Regression] gcc 4.6 ICE on noreturn function at -Os and above
2013-03-01 18:50 [Bug tree-optimization/56501] New: gcc 4.6 ICE on noreturn function at -Os and above dhazeghi at yahoo dot com
2013-03-03 11:06 ` [Bug tree-optimization/56501] " mikpe at it dot uu.se
2013-03-04 10:45 ` [Bug tree-optimization/56501] [4.6/4.7 Regression] " rguenth at gcc dot gnu.org
@ 2013-04-03 10:10 ` rguenth at gcc dot gnu.org
2013-04-03 10:29 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-03 10:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56501
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2013-04-03
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-03 10:10:06 UTC ---
Testing
Index: gcc/tree-switch-conversion.c
===================================================================
--- gcc/tree-switch-conversion.c (revision 197348)
+++ gcc/tree-switch-conversion.c (working copy)
@@ -283,7 +283,12 @@ check_process_case (tree cs)
return false;
}
- e = single_succ_edge (label_bb);
+ if (!single_succ_p (label_bb))
+ {
+ info.reason
+ = " Bad case - a non-final BB without a single successor\n";
+ return false;
+ }
following_bb = single_succ (label_bb);
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/56501] [4.6/4.7 Regression] gcc 4.6 ICE on noreturn function at -Os and above
2013-03-01 18:50 [Bug tree-optimization/56501] New: gcc 4.6 ICE on noreturn function at -Os and above dhazeghi at yahoo dot com
` (2 preceding siblings ...)
2013-04-03 10:10 ` rguenth at gcc dot gnu.org
@ 2013-04-03 10:29 ` rguenth at gcc dot gnu.org
2013-04-03 12:03 ` [Bug tree-optimization/56501] [4.6 " rguenth at gcc dot gnu.org
2013-04-12 16:29 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-03 10:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56501
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-03 10:29:27 UTC ---
Author: rguenth
Date: Wed Apr 3 10:28:27 2013
New Revision: 197401
URL: http://gcc.gnu.org/viewcvs?rev=197401&root=gcc&view=rev
Log:
2013-04-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/56501
* gcc.dg/torture/pr56501.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr56501.c
Modified:
trunk/gcc/testsuite/ChangeLog
Author: rguenth
Date: Wed Apr 3 10:28:59 2013
New Revision: 197402
URL: http://gcc.gnu.org/viewcvs?rev=197402&root=gcc&view=rev
Log:
2013-04-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/56501
* gcc.dg/torture/pr56501.c: New testcase.
Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr56501.c
Modified:
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/56501] [4.6 Regression] gcc 4.6 ICE on noreturn function at -Os and above
2013-03-01 18:50 [Bug tree-optimization/56501] New: gcc 4.6 ICE on noreturn function at -Os and above dhazeghi at yahoo dot com
` (3 preceding siblings ...)
2013-04-03 10:29 ` rguenth at gcc dot gnu.org
@ 2013-04-03 12:03 ` rguenth at gcc dot gnu.org
2013-04-12 16:29 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-03 12:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56501
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.7.3, 4.8.0
Summary|[4.6/4.7 Regression] gcc |[4.6 Regression] gcc 4.6
|4.6 ICE on noreturn |ICE on noreturn function at
|function at -Os and above |-Os and above
Known to fail| |4.7.2
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-03 12:03:29 UTC ---
Author: rguenth
Date: Wed Apr 3 12:02:56 2013
New Revision: 197405
URL: http://gcc.gnu.org/viewcvs?rev=197405&root=gcc&view=rev
Log:
2013-04-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/56501
* tree-switch-conversion.c (check_process_case): Properly
handle !single_succ_p case.
* gcc.dg/torture/pr56501.c: New testcase.
Added:
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr56501.c
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/tree-switch-conversion.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/56501] [4.6 Regression] gcc 4.6 ICE on noreturn function at -Os and above
2013-03-01 18:50 [Bug tree-optimization/56501] New: gcc 4.6 ICE on noreturn function at -Os and above dhazeghi at yahoo dot com
` (4 preceding siblings ...)
2013-04-03 12:03 ` [Bug tree-optimization/56501] [4.6 " rguenth at gcc dot gnu.org
@ 2013-04-12 16:29 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 16:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56501
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|4.6.4 |4.7.3
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 16:29:06 UTC ---
The 4.6 branch has been closed, fixed in GCC 4.7.3.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-04-12 16:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-01 18:50 [Bug tree-optimization/56501] New: gcc 4.6 ICE on noreturn function at -Os and above dhazeghi at yahoo dot com
2013-03-03 11:06 ` [Bug tree-optimization/56501] " mikpe at it dot uu.se
2013-03-04 10:45 ` [Bug tree-optimization/56501] [4.6/4.7 Regression] " rguenth at gcc dot gnu.org
2013-04-03 10:10 ` rguenth at gcc dot gnu.org
2013-04-03 10:29 ` rguenth at gcc dot gnu.org
2013-04-03 12:03 ` [Bug tree-optimization/56501] [4.6 " rguenth at gcc dot gnu.org
2013-04-12 16:29 ` 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).