public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/48442] New: ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100
@ 2011-04-04 23:44 zsojka at seznam dot cz
  2011-04-06 13:39 ` [Bug rtl-optimization/48442] " amonakov at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2011-04-04 23:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48442

           Summary: ICE: in init_seqno, at sel-sched.c:6767 with -Os
                    -fselective-scheduling2 --param
                    max-sched-extend-regions-iters=100
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 23874
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23874
auto-reduced testcase (from gcc.c-torture/compile/930523-1.c)

Compiler output (4.6/4.7):
$ gcc -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100
testcase.c
testcase.c: In function 'f':
testcase.c:25:1: internal compiler error: in init_seqno, at sel-sched.c:6767
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

(gdb) bt
#0  fancy_abort (file=0x116c168 "/mnt/svn/gcc-trunk/gcc/sel-sched.c",
line=6767, function=0x116d393 "init_seqno")
    at /mnt/svn/gcc-trunk/gcc/diagnostic.c:892
#1  0x00000000008a28aa in init_seqno (number_of_insns=2,
blocks_to_reschedule=0x0, from=0x7ffff5976b60)
    at /mnt/svn/gcc-trunk/gcc/sel-sched.c:6767
#2  0x00000000008a9f51 in sel_sched_region_1 (rgn=0) at
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7486
#3  sel_sched_region (rgn=0) at /mnt/svn/gcc-trunk/gcc/sel-sched.c:7599
#4  0x00000000008abb0a in run_selective_scheduling () at
/mnt/svn/gcc-trunk/gcc/sel-sched.c:7675
#5  0x0000000000879b16 in rest_of_handle_sched2 () at
/mnt/svn/gcc-trunk/gcc/sched-rgn.c:3524
#6  0x00000000007efd46 in execute_one_pass (pass=0x1649ba0) at
/mnt/svn/gcc-trunk/gcc/passes.c:1555
#7  0x00000000007f0035 in execute_pass_list (pass=0x1649ba0) at
/mnt/svn/gcc-trunk/gcc/passes.c:1610
#8  0x00000000007f0047 in execute_pass_list (pass=0x1649180) at
/mnt/svn/gcc-trunk/gcc/passes.c:1611
#9  0x00000000007f0047 in execute_pass_list (pass=0x16491e0) at
/mnt/svn/gcc-trunk/gcc/passes.c:1611
#10 0x0000000000934d15 in tree_rest_of_compilation (fndecl=0x7ffff5977f00) at
/mnt/svn/gcc-trunk/gcc/tree-optimize.c:422
#11 0x0000000000b01337 in cgraph_expand_function (node=0x7ffff5998000) at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1580
#12 0x0000000000b03a8c in cgraph_expand_all_functions () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1639
#13 cgraph_optimize () at /mnt/svn/gcc-trunk/gcc/cgraphunit.c:1903
#14 0x0000000000b0401a in cgraph_finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1100
#15 0x0000000000509094 in c_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/c-decl.c:9879
#16 0x00000000008dd94d in compile_file (argc=16, argv=0x7fffffffdc28) at
/mnt/svn/gcc-trunk/gcc/toplev.c:591


Compiler output (4.4/4.5):
$ gcc -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100
testcase.c
testcase.c: In function 'f':
testcase.c:25:1: error: wrong amount of branch edges after conditional jump 2
testcase.c:25:1: internal compiler error: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

(gdb) bt
#0  error (gmsgid=0x1059ff8 "wrong amount of branch edges after conditional
jump %i") at /mnt/svn/gcc-4_5/gcc/diagnostic.c:625
#1  0x000000000058c33f in rtl_verify_flow_info_1 () at
/mnt/svn/gcc-4_5/gcc/cfgrtl.c:1955
#2  0x000000000058d353 in rtl_verify_flow_info () at
/mnt/svn/gcc-4_5/gcc/cfgrtl.c:2058
#3  0x000000000057d007 in verify_flow_info () at
/mnt/svn/gcc-4_5/gcc/cfghooks.c:257
#4  0x00000000007759ce in execute_function_todo (data=<value optimized out>) at
/mnt/svn/gcc-4_5/gcc/passes.c:1262
#5  0x000000000077575a in execute_todo (flags=132107) at
/mnt/svn/gcc-4_5/gcc/passes.c:1287
#6  0x0000000000777df2 in execute_one_pass (pass=0x15557a0) at
/mnt/svn/gcc-4_5/gcc/passes.c:1591
#7  0x0000000000778005 in execute_pass_list (pass=0x15557a0) at
/mnt/svn/gcc-4_5/gcc/passes.c:1623
#8  0x0000000000778017 in execute_pass_list (pass=0x1554ac0) at
/mnt/svn/gcc-4_5/gcc/passes.c:1624
#9  0x0000000000778017 in execute_pass_list (pass=0x1554a60) at
/mnt/svn/gcc-4_5/gcc/passes.c:1624
#10 0x00000000008b8775 in tree_rest_of_compilation (fndecl=0x7ffff575d800) at
/mnt/svn/gcc-4_5/gcc/tree-optimize.c:413
#11 0x0000000000a52dc1 in cgraph_expand_function (node=0x7ffff7ed14e0) at
/mnt/svn/gcc-4_5/gcc/cgraphunit.c:1574
#12 0x0000000000a55735 in cgraph_expand_all_functions () at
/mnt/svn/gcc-4_5/gcc/cgraphunit.c:1653
#13 cgraph_optimize () at /mnt/svn/gcc-4_5/gcc/cgraphunit.c:1909
#14 0x0000000000a55e95 in cgraph_finalize_compilation_unit () at
/mnt/svn/gcc-4_5/gcc/cgraphunit.c:1122
#15 0x00000000004b12e3 in c_write_global_declarations () at
/mnt/svn/gcc-4_5/gcc/c-decl.c:9520
#16 0x0000000000867a65 in compile_file (argc=16, argv=0x7fffffffdbf8) at
/mnt/svn/gcc-4_5/gcc/toplev.c:1065


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/48442] ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100
  2011-04-04 23:44 [Bug rtl-optimization/48442] New: ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100 zsojka at seznam dot cz
@ 2011-04-06 13:39 ` amonakov at gcc dot gnu.org
  2011-04-06 13:41 ` amonakov at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: amonakov at gcc dot gnu.org @ 2011-04-06 13:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48442

--- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> 2011-04-06 13:39:44 UTC ---
Created attachment 23899
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23899
proposed patch


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/48442] ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100
  2011-04-04 23:44 [Bug rtl-optimization/48442] New: ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100 zsojka at seznam dot cz
  2011-04-06 13:39 ` [Bug rtl-optimization/48442] " amonakov at gcc dot gnu.org
@ 2011-04-06 13:41 ` amonakov at gcc dot gnu.org
  2011-04-06 13:42 ` amonakov at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: amonakov at gcc dot gnu.org @ 2011-04-06 13:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48442

--- Comment #2 from Alexander Monakov <amonakov at gcc dot gnu.org> 2011-04-06 13:41:33 UTC ---
Confirmed.  The 4.4/4.5 failure is most likely a dup of PR 46204.  The 4.6/4.7
failure is due to selective scheduler removing a conditional jump during
purge_empty_blocks in sel_sched_region_1 and then tripping on an incorrect
assert in init_seqno (we probably never managed to remove jumps at that point
prior to PR 46204 fix, but the nearby comment suggests we could and contradicts
the assert).  I'll test the attached patch that relaxes the assert and also
drops number_of_insns argument to clean up a bit.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/48442] ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100
  2011-04-04 23:44 [Bug rtl-optimization/48442] New: ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100 zsojka at seznam dot cz
  2011-04-06 13:39 ` [Bug rtl-optimization/48442] " amonakov at gcc dot gnu.org
  2011-04-06 13:41 ` amonakov at gcc dot gnu.org
@ 2011-04-06 13:42 ` amonakov at gcc dot gnu.org
  2011-04-07  7:18 ` abel at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: amonakov at gcc dot gnu.org @ 2011-04-06 13:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48442

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.04.06 13:41:57
                 CC|                            |amonakov at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |amonakov at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/48442] ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100
  2011-04-04 23:44 [Bug rtl-optimization/48442] New: ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100 zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-04-06 13:42 ` amonakov at gcc dot gnu.org
@ 2011-04-07  7:18 ` abel at gcc dot gnu.org
  2011-04-08 11:45 ` amonakov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: abel at gcc dot gnu.org @ 2011-04-07  7:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48442

Andrey Belevantsev <abel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abel at gcc dot gnu.org

--- Comment #3 from Andrey Belevantsev <abel at gcc dot gnu.org> 2011-04-07 07:18:04 UTC ---
(In reply to comment #2)
> Confirmed.  The 4.4/4.5 failure is most likely a dup of PR 46204.  The 4.6/4.7
I have ported PR 46204 to 4.5, so we need to recheck there and probably port
your patch to 4.5 too.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/48442] ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100
  2011-04-04 23:44 [Bug rtl-optimization/48442] New: ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100 zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-04-07  7:18 ` abel at gcc dot gnu.org
@ 2011-04-08 11:45 ` amonakov at gcc dot gnu.org
  2011-04-08 14:35 ` amonakov at gcc dot gnu.org
  2015-05-07 20:46 ` amonakov at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: amonakov at gcc dot gnu.org @ 2011-04-08 11:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48442

--- Comment #4 from Alexander Monakov <amonakov at gcc dot gnu.org> 2011-04-08 11:44:54 UTC ---
Author: amonakov
Date: Fri Apr  8 11:44:51 2011
New Revision: 172173

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172173
Log:
    PR rtl-optimization/48442
    * sel-sched.c (init_seqno): Remove number_of_insns argument.  Update
    all callers.  Adjust assert.

testsuite:
    * gcc.dg/pr48442.c: New.


Added:
    trunk/gcc/testsuite/gcc.dg/pr48442.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/sel-sched.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/48442] ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100
  2011-04-04 23:44 [Bug rtl-optimization/48442] New: ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100 zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-04-08 11:45 ` amonakov at gcc dot gnu.org
@ 2011-04-08 14:35 ` amonakov at gcc dot gnu.org
  2015-05-07 20:46 ` amonakov at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: amonakov at gcc dot gnu.org @ 2011-04-08 14:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48442

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.7.0
      Known to fail|4.7.0                       |

--- Comment #5 from Alexander Monakov <amonakov at gcc dot gnu.org> 2011-04-08 14:35:07 UTC ---
Fixed on the trunk, backports pending (4.5 fails in the same way as 4.6/4.7
after Andrey's backport).


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug rtl-optimization/48442] ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100
  2011-04-04 23:44 [Bug rtl-optimization/48442] New: ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100 zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2011-04-08 14:35 ` amonakov at gcc dot gnu.org
@ 2015-05-07 20:46 ` amonakov at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: amonakov at gcc dot gnu.org @ 2015-05-07 20:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48442

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-05-07 20:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-04 23:44 [Bug rtl-optimization/48442] New: ICE: in init_seqno, at sel-sched.c:6767 with -Os -fselective-scheduling2 --param max-sched-extend-regions-iters=100 zsojka at seznam dot cz
2011-04-06 13:39 ` [Bug rtl-optimization/48442] " amonakov at gcc dot gnu.org
2011-04-06 13:41 ` amonakov at gcc dot gnu.org
2011-04-06 13:42 ` amonakov at gcc dot gnu.org
2011-04-07  7:18 ` abel at gcc dot gnu.org
2011-04-08 11:45 ` amonakov at gcc dot gnu.org
2011-04-08 14:35 ` amonakov at gcc dot gnu.org
2015-05-07 20:46 ` amonakov 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).