public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/18861] New: [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637
@ 2004-12-06 22:41 belyshev at lubercy dot com
2004-12-06 22:58 ` [Bug middle-end/18861] " belyshev at lubercy dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: belyshev at lubercy dot com @ 2004-12-06 22:41 UTC (permalink / raw)
To: gcc-bugs
use '-O2 -finline-functions -ftracer -floop-optimize2' to reproduce:
----------------------------------------------------------------------------------------
extern void fancy_abort (void) __attribute__ ((__noreturn__));
int
reverse_condition (int code)
{
switch (code)
{
case 4:
return 3;
case 3:
return 4;
case 6:
return 7;
case 7:
return 8;
case 8:
return 5;
case 5:
return 6;
default:
fancy_abort ();
}
}
int
reversed_comparison_code_parts (int code, int code2)
{
switch (code)
{
case 4:
case 3:
return reverse_condition (code);
}
if (code2 == 1)
return reverse_condition (code);
return 0;
}
----------------------------------------------------------------------------------------
backtrace:
Program received signal SIGSEGV, Segmentation fault.
try_crossjump_to_edge (mode=19, e1=0x7, e2=0x40219a08) at
../../gcc/gcc/cfgcleanup.c:1637
1637 s->count += s2->count;
(gdb) bt
#0 try_crossjump_to_edge (mode=19, e1=0x7, e2=0x40219a08) at
../../gcc/gcc/cfgcleanup.c:1637
#1 0x08178cfa in try_crossjump_bb (mode=19, bb=0x4021acb0) at
../../gcc/gcc/cfgcleanup.c:1810
#2 0x08179acc in cleanup_cfg (mode=19) at ../../gcc/gcc/cfgcleanup.c:1997
#3 0x083b8127 in rest_of_handle_flow2 () at ../../gcc/gcc/passes.c:1322
#4 0x083b8b20 in rest_of_compilation () at ../../gcc/gcc/passes.c:1728
#5 0x080c91aa in execute_pass_list (pass=0x852ba80) at
../../gcc/gcc/tree-optimize.c:516
#6 0x080c93f1 in tree_rest_of_compilation (fndecl=0x4020f244)
at ../../gcc/gcc/tree-optimize.c:652
#7 0x080615d1 in c_expand_body (fndecl=0x4020f244) at ../../gcc/gcc/c-decl.c:6387
#8 0x083e1167 in cgraph_expand_function (node=0x4020f4fc) at
../../gcc/gcc/cgraphunit.c:822
#9 0x083e1e8b in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1689
#10 0x0838fa67 in toplev_main (argc=1075931488, argv=0x85d1498) at
../../gcc/gcc/toplev.c:1005
#11 0x080a7bae in main (argc=1075931488, argv=0x40216960) at ../../gcc/gcc/main.c:35
--
Summary: [4.0 Regression] ICE Segmentation fault in
try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: belyshev at lubercy dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18861
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/18861] [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637
2004-12-06 22:41 [Bug middle-end/18861] New: [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 belyshev at lubercy dot com
@ 2004-12-06 22:58 ` belyshev at lubercy dot com
2004-12-06 23:08 ` [Bug middle-end/18861] [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 with two switches (table jumps) pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: belyshev at lubercy dot com @ 2004-12-06 22:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From belyshev at lubercy dot com 2004-12-06 22:58 -------
: Search converges between 2004-10-25-161001-trunk (#610) and
2004-10-26-161001-trunk (#611).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18861
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/18861] [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 with two switches (table jumps)
2004-12-06 22:41 [Bug middle-end/18861] New: [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 belyshev at lubercy dot com
2004-12-06 22:58 ` [Bug middle-end/18861] " belyshev at lubercy dot com
@ 2004-12-06 23:08 ` pinskia at gcc dot gnu dot org
2004-12-08 0:18 ` [Bug rtl-optimization/18861] " steven at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-06 23:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-06 23:07 -------
: Search converges between 2004-10-26-161001-trunk (#611) and 2004-11-03-014001-trunk
(#612).
Confirmed.
Here is a testcase down to one function:
extern void abort (void) __attribute__ ((__noreturn__));
int reversed_comparison_code_parts (int code, int code2)
{
int D1131;
if (code >= 3)
{
switch (code)
{
case 3: return 4;
case 4: return 3;
case 5: return 6;
case 6: return 7;
case 7: return 8;
case 8: return 5;
default : abort ();
}
}
switch (code)
{
case 3: return 4;
case 4: return 3;
case 5: return 6;
case 6: return 7;
case 7: return 8;
case 8: return 5;
default : abort ();
}
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-12-06 23:07:59
date| |
Summary|[4.0 Regression] ICE |[4.0 Regression] ICE
|Segmentation fault in |Segmentation fault in
|try_crossjump_to_edge at |try_crossjump_to_edge at
|../../gcc/gcc/cfgcleanup.c:1|../../gcc/gcc/cfgcleanup.c:1
|637 |637 with two switches (table
| |jumps)
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18861
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/18861] [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 with two switches (table jumps)
2004-12-06 22:41 [Bug middle-end/18861] New: [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 belyshev at lubercy dot com
2004-12-06 22:58 ` [Bug middle-end/18861] " belyshev at lubercy dot com
2004-12-06 23:08 ` [Bug middle-end/18861] [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 with two switches (table jumps) pinskia at gcc dot gnu dot org
@ 2004-12-08 0:18 ` steven at gcc dot gnu dot org
2004-12-12 5:55 ` kazu at cs dot umass dot edu
2004-12-12 10:04 ` steven at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-08 0:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-12-08 00:18 -------
"-O2 -floop-optimize2" is enough for the test case in comment 2.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18861
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/18861] [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 with two switches (table jumps)
2004-12-06 22:41 [Bug middle-end/18861] New: [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 belyshev at lubercy dot com
` (2 preceding siblings ...)
2004-12-08 0:18 ` [Bug rtl-optimization/18861] " steven at gcc dot gnu dot org
@ 2004-12-12 5:55 ` kazu at cs dot umass dot edu
2004-12-12 10:04 ` steven at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-12-12 5:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-12-12 05:55 -------
My binary search converges between "2004-11-02 00:20GMT"
and "2004-11-02 00:25GMT".
The following patch has either caused the bug or exposed a latent bug.
Adding Andrew MacLeod to CC.
2004-11-01 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimization/16447
* tree-cfg.c (bsi_commit_one_edge_insert): Rename from
bsi_commit_edge_inserts_1, and make funtion external. Return new block.
(bsi_commit_edge_inserts): Use renamed bsi_commit_one_edge_insert.
* tree-optimize.c (pass_cleanup_cfg_post_optimizing): Enable listing.
* tree-flow.h (bsi_commit_one_edge_insert): Extern decl.
* tree-outof-ssa.c (rewrite_trees): Don't commit edges here.
(same_stmt_list_p): New. Return TRUE if edge is to be forwarded.
(identical_copies_p): New. Return true is two copies are the same.
(identical_stmt_lists_p): New. Return true if stmt lists are the same.
(analyze_edges_for_bb): New. Determine how best to insert edge stmts
for a basic block.
(perform_edge_inserts): New. Determine what to do with all stmts that
have been inserted on edges.
(remove_ssa_form): Analyze and commit edges from here.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |amacleod at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18861
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/18861] [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 with two switches (table jumps)
2004-12-06 22:41 [Bug middle-end/18861] New: [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 belyshev at lubercy dot com
` (3 preceding siblings ...)
2004-12-12 5:55 ` kazu at cs dot umass dot edu
@ 2004-12-12 10:04 ` steven at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-12 10:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-12-12 10:04 -------
Since the bug is at the RTL level and amacleod's patch only changes things
at the tree level, that patch probably just uncovered a latent bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18861
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-12-12 10:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-06 22:41 [Bug middle-end/18861] New: [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 belyshev at lubercy dot com
2004-12-06 22:58 ` [Bug middle-end/18861] " belyshev at lubercy dot com
2004-12-06 23:08 ` [Bug middle-end/18861] [4.0 Regression] ICE Segmentation fault in try_crossjump_to_edge at ../../gcc/gcc/cfgcleanup.c:1637 with two switches (table jumps) pinskia at gcc dot gnu dot org
2004-12-08 0:18 ` [Bug rtl-optimization/18861] " steven at gcc dot gnu dot org
2004-12-12 5:55 ` kazu at cs dot umass dot edu
2004-12-12 10:04 ` steven at gcc dot gnu dot 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).